diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 18:00:30 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:20:12 +0100 |
commit | 8574e7e62a9675eeed2de06d3f8af08044fe5176 (patch) | |
tree | 18bca7c2887407597817695c0e85e3032b4f0be9 | |
parent | d0d2343b0d296e6998fdfc8420ae3f9317fdfd69 (diff) |
nix crash on filter settings with no filter
-rw-r--r-- | facetracknoir/ui.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index d1b8ed43..0a11de42 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -359,12 +359,16 @@ void MainWindow::showProtocolSettings() { } void MainWindow::showFilterSettings() { - auto dialog = mk_dialog<IFilterDialog>(current_filter()); + if (libs.pFilter != nullptr) + { + auto dialog = mk_dialog<IFilterDialog>(current_filter()); - if (dialog) { - pFilterDialog = dialog; - dialog->register_filter(libs.pFilter.get()); - dialog->show(); + if (dialog) + { + pFilterDialog = dialog; + dialog->register_filter(libs.pFilter.get()); + dialog->show(); + } } } |