From ee4cd1270faa9a9024b4e700bce09cd451d23019 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 4 May 2015 11:57:01 +0200 Subject: initialize member variables in all cases Otherwise led to stale pointer dereference. --- opentrack/plugin-support.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'opentrack') diff --git a/opentrack/plugin-support.cpp b/opentrack/plugin-support.cpp index 2c129906..403798de 100644 --- a/opentrack/plugin-support.cpp +++ b/opentrack/plugin-support.cpp @@ -120,15 +120,16 @@ QList> dylib::enum_libraries() dylib::dylib(const QString& filename, Type t) : type(t), + filename(filename), Dialog(nullptr), Constructor(nullptr), - Meta(nullptr) + Meta(nullptr), + handle(nullptr) { // otherwise dlopen opens the calling executable if (filename.size() == 0) return; - this->filename = filename; #if defined(_WIN32) QString fullPath = QCoreApplication::applicationDirPath() + "/" + this->filename; handle = new QLibrary(fullPath); -- cgit v1.2.3