fixed uninitialized memory read in calling rsservicehandler registerNewService system

This commit is contained in:
csoler 2019-06-24 21:12:27 +02:00
parent 2f81b11dee
commit ff1b2ebde4
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -110,9 +110,8 @@ p3discovery2::p3discovery2(
// Add self into PGP FriendList. // Add self into PGP FriendList.
mFriendList[AuthGPG::getAuthGPG()->getGPGOwnId()] = DiscPgpInfo(); mFriendList[AuthGPG::getAuthGPG()->getGPGOwnId()] = DiscPgpInfo();
rsEvents->registerEventsHandler( mRsEventsHandle = 0 ; // avoids random behavior if not initialized
[this](const RsEvent& event){ rsEventsHandler(event); }, rsEvents->registerEventsHandler( [this](const RsEvent& event){ rsEventsHandler(event); }, mRsEventsHandle );
mRsEventsHandle );
} }