1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00

Fix segfaults

This commit is contained in:
Ralf Ramsauer 2015-09-30 00:44:06 +02:00
parent 1984f6720e
commit b2244ed9be

View File

@ -155,11 +155,9 @@ int main(int argc, char** argv)
// In normal operation, it never returns // In normal operation, it never returns
doorlock_client(hostname, port); doorlock_client(hostname, port);
// This will stop the Qapplication
mainWindow->hide(); mainWindow->hide();
mainWindow.reset(); mainWindow->close();
// Stop the QT application
app.quit();
}); });
// This routine will never return in normal operation // This routine will never return in normal operation
@ -167,6 +165,9 @@ int main(int argc, char** argv)
clientThread.join(); clientThread.join();
if (mainWindow)
mainWindow.reset();
l(LogLevel::notice, "Stopping doorlock-client"); l(LogLevel::notice, "Stopping doorlock-client");
return 0; return 0;
} }