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:
parent
ae91311241
commit
a3b4198270
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user