From 8574e7e62a9675eeed2de06d3f8af08044fe5176 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 4 Nov 2014 18:00:30 +0100 Subject: nix crash on filter settings with no filter --- facetracknoir/ui.cpp | 14 +++++++++----- 1 file 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(current_filter()); + if (libs.pFilter != nullptr) + { + auto dialog = mk_dialog(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(); + } } } -- cgit v1.2.3