From 7db717ee7c503aef3f3b70bbc4becb8c20485897 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 3 Mar 2025 23:36:03 +0200 Subject: [PATCH] fix null mainwindow in case of login on setup Signed-off-by: Trial97 --- launcher/Application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index e221aef0d..06e85a5de 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -1177,6 +1177,9 @@ bool Application::event(QEvent* event) #endif if (event->type() == QEvent::FileOpen) { + if (!m_mainWindow) { + showMainWindow(false); + } auto ev = static_cast(event); m_mainWindow->processURLs({ ev->url() }); } @@ -1310,6 +1313,9 @@ void Application::messageReceived(const QByteArray& message) qWarning() << "Received" << command << "message without a zip path/URL."; return; } + if (!m_mainWindow) { + showMainWindow(false); + } m_mainWindow->processURLs({ normalizeImportUrl(url) }); } else if (command == "launch") { QString id = received.args["id"];