fixed potential crash due to not updating mPendingDataIterator after deleting map entry

This commit is contained in:
csoler 2016-04-13 18:41:49 -04:00
parent 92eb9c5113
commit 971f8e0c12

View File

@ -262,6 +262,10 @@ bool GxsIdDetails::process(const RsGxsId &id, GxsIdDetailsCallbackFunction callb
if(it != mInstance->mPendingData.end()) if(it != mInstance->mPendingData.end())
{ {
mInstance->connectObject_locked(object, false); mInstance->connectObject_locked(object, false);
if(mInstance->mPendingDataIterator == it)
mInstance->mPendingDataIterator = mInstance->mPendingData.erase(it) ;
else
mInstance->mPendingData.erase(it) ; mInstance->mPendingData.erase(it) ;
} }