Bug fix possible situation in which memory is detached

This commit is contained in:
Itay Grudev 2016-05-04 17:36:32 +01:00
parent c5ea3f6d30
commit fc5ce4c335

View File

@ -121,14 +121,11 @@ SingleApplication::SingleApplication(int &argc, char *argv[])
// might have crashed. // might have crashed.
// So only after a successful connection is the second instance // So only after a successful connection is the second instance
// terminated. // terminated.
if( d->socket->waitForConnected(100) ) d->socket->waitForConnected(100);
{ delete d->memory;
// Terminate the program using STDLib's exit function // Terminate the program using STDLib's exit function
::exit(EXIT_SUCCESS); ::exit(EXIT_SUCCESS);
} else {
delete d->memory;
::exit(EXIT_SUCCESS);
}
} }
} }