mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed possible crash in GxsIdDetails
This commit is contained in:
parent
d5ed84ec9d
commit
cf746f160c
@ -127,8 +127,8 @@ void GxsIdDetails::connectObject_locked(QObject *object, bool doConnect)
|
|||||||
|
|
||||||
/* Search Object in pending list */
|
/* Search Object in pending list */
|
||||||
|
|
||||||
if(mPendingData.find(object) != mPendingData.end())
|
if(mPendingData.find(object) == mPendingData.end()) // force disconnect when not in the list
|
||||||
return ;
|
doConnect = false ;
|
||||||
|
|
||||||
if (doConnect) {
|
if (doConnect) {
|
||||||
connect(object, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*)));
|
connect(object, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*)));
|
||||||
@ -169,10 +169,10 @@ void GxsIdDetails::timerEvent(QTimerEvent *event)
|
|||||||
pendingData.mCallback(GXS_ID_DETAILS_TYPE_DONE, details, pendingData.mObject, pendingData.mData);
|
pendingData.mCallback(GXS_ID_DETAILS_TYPE_DONE, details, pendingData.mObject, pendingData.mData);
|
||||||
|
|
||||||
QObject *object = pendingData.mObject;
|
QObject *object = pendingData.mObject;
|
||||||
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
|
||||||
|
|
||||||
connectObject_locked(object, false);
|
connectObject_locked(object, false);
|
||||||
|
|
||||||
|
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,10 +182,10 @@ void GxsIdDetails::timerEvent(QTimerEvent *event)
|
|||||||
pendingData.mCallback(GXS_ID_DETAILS_TYPE_FAILED, details, pendingData.mObject, pendingData.mData);
|
pendingData.mCallback(GXS_ID_DETAILS_TYPE_FAILED, details, pendingData.mObject, pendingData.mData);
|
||||||
|
|
||||||
QObject *object = pendingData.mObject;
|
QObject *object = pendingData.mObject;
|
||||||
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
|
||||||
|
|
||||||
connectObject_locked(object, false);
|
connectObject_locked(object, false);
|
||||||
|
|
||||||
|
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user