mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 18:34:25 +01:00
Fix segfaults
This commit is contained in:
parent
1984f6720e
commit
b2244ed9be
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user