From ccda4f557cbdd655629ef693bce6b0520f4f2a56 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 17 Mar 2022 15:24:46 -0700 Subject: [PATCH] mobile: fix broken undo stack initialization We would dereference the undoAction before the command infrastructure was initialized which led to a crash in the mobile app. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 18052b2b9..33741a95a 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -207,13 +207,11 @@ QMLManager::QMLManager() : m_initialized(false), m_pluggedInDeviceName(""), m_showNonDiveComputers(false), - undoAction(Command::undoAction(this)), m_oldStatus(qPrefCloudStorage::CS_UNKNOWN) { m_instance = this; m_lastDevicePixelRatio = qApp->devicePixelRatio(); timer.start(); - // make upload signals available in QML // Remark: signal - signal connect connect(uploadDiveLogsDE::instance(), &uploadDiveLogsDE::uploadFinish, @@ -334,6 +332,7 @@ QMLManager::QMLManager() : // setup Command infrastructure Command::init(); + undoAction = Command::undoAction(this); } void QMLManager::applicationStateChanged(Qt::ApplicationState state)