From e5598d9d15a6e7a91d3aaae9efce2c1e115a0267 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 3 Jul 2015 17:01:09 +0200 Subject: ui: bail early if no dialog can be found Issue: #182 --- facetracknoir/ui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index 5a600f02..33ff6ecd 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -360,6 +360,7 @@ void MainWindow::showTrackerSettings() else { auto dialog = mk_dialog(current_tracker()); + if (!dialog) return; pTrackerDialog = dialog; if (libs.pTracker != nullptr) dialog->register_tracker(libs.pTracker.get()); @@ -376,6 +377,7 @@ void MainWindow::showProtocolSettings() { } else { auto dialog = mk_dialog(current_protocol()); + if (!dialog) return; pProtocolDialog = dialog; if (libs.pProtocol != nullptr) dialog->register_protocol(libs.pProtocol.get()); @@ -392,6 +394,7 @@ void MainWindow::showFilterSettings() { } else { auto dialog = mk_dialog(current_filter()); + if (!dialog) return; pFilterDialog = dialog; if (libs.pFilter != nullptr) dialog->register_filter(libs.pFilter.get()); -- cgit v1.2.3