From 81034fae510b11a71bad080f2a05ada9e78d40bf Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 14 Dec 2020 17:37:54 +0100 Subject: [PATCH] Fix Uninit mEventHandlerId in RemoteDirModel --- retroshare-gui/src/gui/RemoteDirModel.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index f989a2ec5..251f0a731 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -57,6 +57,7 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent) , ageIndicator(IND_ALWAYS) , RemoteMode(mode)//, nIndex(1), indexSet(1) /* ass zero index cant be used */ , mLastRemote(false), mLastReq(0), mUpdating(false) + , mEventHandlerId(0) { #if QT_VERSION < QT_VERSION_CHECK (5, 0, 0) setSupportedDragActions(Qt::CopyAction); @@ -65,13 +66,13 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent) mDirDetails.ref = (void*)intptr_t(0xffffffff) ; - rsEvents->registerEventsHandler( - [this](std::shared_ptr event) - { - RsQThreadUtils::postToObject( [this,event]() { handleEvent_main_thread(event); }); - }, - mEventHandlerId, - RsEventType::SHARED_DIRECTORIES ); + rsEvents->registerEventsHandler( + [this](std::shared_ptr event) + { + RsQThreadUtils::postToObject( [this,event]() { handleEvent_main_thread(event); }); + } + , mEventHandlerId + , RsEventType::SHARED_DIRECTORIES ); } RetroshareDirModel::~RetroshareDirModel()