From f5159c9d698e5b0d7c4b40ec2076a46d89c972e8 Mon Sep 17 00:00:00 2001 From: ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ 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.3