mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Merge pull request #100 from emericg/mobileexit
Fix a crash when exiting an application on Android and iOS
This commit is contained in:
commit
69b94ec452
@ -69,19 +69,21 @@ SingleApplicationPrivate::~SingleApplicationPrivate()
|
|||||||
delete socket;
|
delete socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
memory->lock();
|
if( memory != nullptr ) {
|
||||||
InstancesInfo* inst = static_cast<InstancesInfo*>(memory->data());
|
memory->lock();
|
||||||
if( server != nullptr ) {
|
InstancesInfo* inst = static_cast<InstancesInfo*>(memory->data());
|
||||||
server->close();
|
if( server != nullptr ) {
|
||||||
delete server;
|
server->close();
|
||||||
inst->primary = false;
|
delete server;
|
||||||
inst->primaryPid = -1;
|
inst->primary = false;
|
||||||
inst->primaryUser[0] = '\0';
|
inst->primaryPid = -1;
|
||||||
inst->checksum = blockChecksum();
|
inst->primaryUser[0] = '\0';
|
||||||
}
|
inst->checksum = blockChecksum();
|
||||||
memory->unlock();
|
}
|
||||||
|
memory->unlock();
|
||||||
|
|
||||||
delete memory;
|
delete memory;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SingleApplicationPrivate::getUsername()
|
QString SingleApplicationPrivate::getUsername()
|
||||||
|
Loading…
Reference in New Issue
Block a user