diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-11 12:12:51 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-11 12:12:51 +0100 |
commit | fc24671937724beb3fde6c6edfc1c124fbb0ef75 (patch) | |
tree | 02ffda76658d86d76c4620344389851d666164f4 | |
parent | 714a665e6f1c92a02d817b2f2f41254ce03280bc (diff) |
gui: fix crash when no filter selected
-rw-r--r-- | gui/main-window.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 9e90a016..8ddde8a6 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -580,6 +580,7 @@ static bool mk_window_common(ptr<t>& d, F&& ctor) } else if ((d = ptr<t>(ctor()))) { + qDebug() << d.get(); QEventLoop e(QThread::currentThread()); d->adjustSize(); @@ -605,7 +606,7 @@ template<typename t> bool mk_dialog(mem<dylib> lib, ptr<t>& d) { const bool just_created = mk_window_common(d, [&]() -> t* { - if (lib) + if (lib && lib->Dialog) return reinterpret_cast<t*>(lib->Dialog()); return nullptr; }); |