diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-11-08 12:30:39 +0100 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-11-08 14:19:46 +0000 |
commit | 58447619b632460a24944f57d1eb22fd9aa9fffd (patch) | |
tree | 5129959be1359910521386991b5fbe7a1be64ea3 /ui/qt/endpoint_dialog.cpp | |
parent | 47909d32fc0e667db4c00920e5e84096d2ea174d (diff) | |
download | wireshark-58447619b632460a24944f57d1eb22fd9aa9fffd.tar.gz |
fix a crash in the endpoint dialogue
compile Wireshark with GeoIP enabled
load a USB capture
open Statistics / Endpoints
the tree is empty, USB is not amongst the selected Enpoint Types
select USB in the Endpoint Types list
-> crash
to fix this, add a NULL check for cur_tree to EndpointDialog::tabChanged()
Change-Id: I43d963ae5cd451120ac354e89e37ccbbbc2c5910
Reviewed-on: https://code.wireshark.org/review/5192
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'ui/qt/endpoint_dialog.cpp')
-rw-r--r-- | ui/qt/endpoint_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp index 6ad046418c..3487f23667 100644 --- a/ui/qt/endpoint_dialog.cpp +++ b/ui/qt/endpoint_dialog.cpp @@ -176,7 +176,7 @@ bool EndpointDialog::addTrafficTable(register_ct_t *table) void EndpointDialog::tabChanged() { EndpointTreeWidget *cur_tree = qobject_cast<EndpointTreeWidget *>(trafficTableTabWidget()->currentWidget()); - map_bt_->setEnabled(cur_tree->hasGeoIPData()); + map_bt_->setEnabled(cur_tree && cur_tree->hasGeoIPData()); } void EndpointDialog::createMap() |