diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-03 17:01:09 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-03 17:01:09 +0200 |
commit | e5598d9d15a6e7a91d3aaae9efce2c1e115a0267 (patch) | |
tree | e8d2cdbcef6c8acd111850a91da10399c39275f6 | |
parent | 228338d8a3d3bedbec9f4f289738dcf236457e47 (diff) |
ui: bail early if no dialog can be found
Issue: #182
-rw-r--r-- | facetracknoir/ui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<ITrackerDialog>(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<IProtocolDialog>(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<IFilterDialog>(current_filter()); + if (!dialog) return; pFilterDialog = dialog; if (libs.pFilter != nullptr) dialog->register_filter(libs.pFilter.get()); |