diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-05 17:33:07 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-05 17:33:07 +0800 |
commit | f5159c9d698e5b0d7c4b40ec2076a46d89c972e8 (patch) | |
tree | 7fa32b6f1f5ac472defb42d9c3e7d9e5723c1fb5 | |
parent | 1ba1c8dc19c59970998aef94351e2cf22c469560 (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.
-rw-r--r-- | controller.cxx | 2 |
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(); |