1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix possible crash on ~IPC

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-13 19:43:03 +01:00
parent ae91311241
commit a3b4198270
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -71,7 +71,9 @@ IPC::~IPC()
{
if (globalMemory.lock())
{
*(time_t*)((char*)globalMemory.data()+sizeof(globalId)) = 0;
char* data = (char*)globalMemory.data();
if (data)
*(time_t*)(data+sizeof(globalId)) = 0;
globalMemory.unlock();
}
}