mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-03 11:00:14 -05:00
Fixed possible crash in the handle methods of RsGxsNetService when the dynamic cast of a received item fails.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7922 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
030c69d95b
commit
83f2ee4c95
@ -2606,6 +2606,8 @@ bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncGrp *item)
|
|||||||
|
|
||||||
void RsGxsNetService::handleRecvSyncGroup(RsNxsSyncGrp* item)
|
void RsGxsNetService::handleRecvSyncGroup(RsNxsSyncGrp* item)
|
||||||
{
|
{
|
||||||
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
RS_STACK_MUTEX(mNxsMutex) ;
|
RS_STACK_MUTEX(mNxsMutex) ;
|
||||||
|
|
||||||
@ -2956,6 +2958,9 @@ bool RsGxsNetService::locked_CanReceiveUpdate(const RsNxsSyncMsg *item)
|
|||||||
}
|
}
|
||||||
void RsGxsNetService::handleRecvSyncMessage(RsNxsSyncMsg* item)
|
void RsGxsNetService::handleRecvSyncMessage(RsNxsSyncMsg* item)
|
||||||
{
|
{
|
||||||
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
RS_STACK_MUTEX(mNxsMutex) ;
|
RS_STACK_MUTEX(mNxsMutex) ;
|
||||||
|
|
||||||
// We do that early, so as to get info about who sends data about which group,
|
// We do that early, so as to get info about who sends data about which group,
|
||||||
@ -3366,6 +3371,10 @@ void RsGxsNetService::handleRecvPublishKeys(RsNxsGroupPublishKeyItem *item)
|
|||||||
#ifdef NXS_NET_DEBUG
|
#ifdef NXS_NET_DEBUG
|
||||||
std::cerr << "RsGxsNetService::sharePublishKeys() " << std::endl;
|
std::cerr << "RsGxsNetService::sharePublishKeys() " << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
RS_STACK_MUTEX(mNxsMutex) ;
|
RS_STACK_MUTEX(mNxsMutex) ;
|
||||||
|
|
||||||
#ifdef NXS_NET_DEBUG
|
#ifdef NXS_NET_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user