From a7288cc912267415196cfa956b7813752748c35c Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Thu, 8 Jun 2017 13:38:52 +0200 Subject: QML UI: do not crash on selecting dive computers For reasons unknown to me, the DCDeviceData instance was freed way too early, and used afterwards, obviously resulting in a SIGSEGV. This commit creates the DCDeviceData as a direct child of the QMLManager instance, ensuring it does not get freed prematurely. Signed-off-by: Jan Mulder Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mobile-widgets/qmlmanager.h') diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index a41ee509a..a4dbb8b56 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -18,6 +18,7 @@ #include "core/btdiscovery.h" #include "core/gpslocation.h" +#include "core/downloadfromdcthread.h" #include "qt-models/divelistmodel.h" class QMLManager : public QObject { @@ -204,6 +205,7 @@ private: bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth); bool currentGitLocalOnly; bool m_showPin; + DCDeviceData *m_device_data; signals: void cloudUserNameChanged(); -- cgit v1.2.3-70-g09d2