From f80ad0435c904731c8d749fa0c71287413e950a8 Mon Sep 17 00:00:00 2001 From: Al <26797547+Al12rs@users.noreply.github.com> Date: Mon, 27 Apr 2026 04:43:16 +0200 Subject: fix crash when CWD is not set to app directory (#2379) --- src/moapplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/moapplication.cpp b/src/moapplication.cpp index e676436a..6e0d5003 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -158,6 +158,10 @@ MOApplication::MOApplication(int& argc, char** argv) : QApplication(argc, argv) m_defaultStyle = "windowsvista"; updateStyle(m_defaultStyle); addDllsToPath(); + + // When MO2 is launched by nxmhandler, CWD is set to `C:\Windows\System32`. + // QtWebEngineProcess crashes if CWD is not set to the application directory. + QDir::setCurrent(QCoreApplication::applicationDirPath()); } OrganizerCore& MOApplication::core() -- cgit v1.3.1