summaryrefslogtreecommitdiff
path: root/controller.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-05 17:33:07 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-05 17:33:07 +0800
commitf5159c9d698e5b0d7c4b40ec2076a46d89c972e8 (patch)
tree7fa32b6f1f5ac472defb42d9c3e7d9e5723c1fb5 /controller.cxx
parent1ba1c8dc19c59970998aef94351e2cf22c469560 (diff)
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.
Diffstat (limited to 'controller.cxx')
-rw-r--r--controller.cxx2
1 files changed, 2 insertions, 0 deletions
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<QQmlApplicationEngine*>(parent);
engine->load(QUrl(QStringLiteral("qrc:/main.qml")));
auto context = engine->rootContext();