From f5159c9d698e5b0d7c4b40ec2076a46d89c972e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 5 Feb 2022 17:33:07 +0800 Subject: Initialise ticketList & historyList with nullptr otherwise it would cause a segmentation fault when the app is closed without ever logging in, as they would still pass the check for deletion. --- controller.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller.cxx b/controller.cxx index eaf819d..390f8c2 100644 --- a/controller.cxx +++ b/controller.cxx @@ -22,6 +22,8 @@ Controller::Controller(QObject* parent) : QObject{parent} , certPath.toLatin1().constData() #endif }; + ticketList = nullptr; + historyList = nullptr; auto engine = static_cast(parent); engine->load(QUrl(QStringLiteral("qrc:/main.qml"))); auto context = engine->rootContext(); -- cgit v1.2.3