diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-05-04 11:57:01 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-05-04 11:57:01 +0200 |
commit | ee4cd1270faa9a9024b4e700bce09cd451d23019 (patch) | |
tree | 917bd41c2d8b53766fc80101634bf8ef4b7a7e89 /opentrack | |
parent | b718529cfa48397c8899a1d6eefdfba09692d151 (diff) |
initialize member variables in all cases
Otherwise led to stale pointer dereference.
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/plugin-support.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<mem<dylib>> 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); |