mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-04-10 06:11:54 +10:00
ipc: handle null currentGeneration in IpcKillCommand::exec
This commit is contained in:
parent
6bcd3d9bbf
commit
15a8409765
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <variant>
|
||||
|
||||
#include <qbuffer.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qlocalserver.h>
|
||||
#include <qlocalsocket.h>
|
||||
#include <qlogging.h>
|
||||
|
|
@ -127,7 +128,9 @@ int IpcClient::connect(const QString& id, const std::function<void(IpcClient& cl
|
|||
|
||||
void IpcKillCommand::exec(IpcServerConnection* /*unused*/) {
|
||||
qInfo() << "Exiting due to IPC request.";
|
||||
EngineGeneration::currentGeneration()->quit();
|
||||
auto* generation = EngineGeneration::currentGeneration();
|
||||
if (generation) generation->quit();
|
||||
else QCoreApplication::exit(0);
|
||||
}
|
||||
|
||||
} // namespace qs::ipc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue