From fc24671937724beb3fde6c6edfc1c124fbb0ef75 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 11 Dec 2016 12:12:51 +0100 Subject: gui: fix crash when no filter selected --- gui/main-window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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& d, F&& ctor) } else if ((d = ptr(ctor()))) { + qDebug() << d.get(); QEventLoop e(QThread::currentThread()); d->adjustSize(); @@ -605,7 +606,7 @@ template bool mk_dialog(mem lib, ptr& d) { const bool just_created = mk_window_common(d, [&]() -> t* { - if (lib) + if (lib && lib->Dialog) return reinterpret_cast(lib->Dialog()); return nullptr; }); -- cgit v1.2.3