summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-01-05 21:47:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-01-05 21:47:07 +0100
commitec0d991988e7732d1aae4afa26799d9aefff7ac4 (patch)
tree6a71d1ef3b0dd42aa1f439ccf68fbe326dd29ae5 /facetracknoir/ui.cpp
parent65423b32dd3e91599335b70bed5df25973cdc2ed (diff)
don't register null tracker/filter/proto when dialog is created
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index e02ce840..50700d46 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -350,7 +350,8 @@ void MainWindow::showTrackerSettings()
if (dialog) {
pTrackerDialog = dialog;
- dialog->register_tracker(libs.pTracker.get());
+ if (libs.pTracker != nullptr)
+ dialog->register_tracker(libs.pTracker.get());
dialog->show();
}
}
@@ -360,6 +361,8 @@ void MainWindow::showProtocolSettings() {
if (dialog) {
pProtocolDialog = dialog;
+ if (libs.pProtocol != nullptr)
+ dialog->register_protocol(libs.pProtocol.get());
dialog->show();
}
}
@@ -367,14 +370,11 @@ void MainWindow::showProtocolSettings() {
void MainWindow::showFilterSettings() {
auto dialog = mk_dialog<IFilterDialog>(current_filter());
-
if (dialog)
{
pFilterDialog = dialog;
if (libs.pFilter != nullptr)
- {
dialog->register_filter(libs.pFilter.get());
- }
dialog->show();
}
}