aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-09-23 14:54:53 +0000
committerEvan Huus <eapache@gmail.com>2012-09-23 14:54:53 +0000
commitbebce51b6b623230693ba138ed4dc1c735153e69 (patch)
tree5284ff22deb2984386f39c23a39de3ce80446e75 /ui
parent7719d4e84a584d6fd08ec0f8dd6c9061fa949e20 (diff)
Display the "no interfaces" message in qtshark on any type of error,
as otherwise certain errors result in just a blank box. Also be sure to free the error string after QT's got its own copy. svn path=/trunk/; revision=45068
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/interface_tree.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp
index 8b9dc473fb..ae6622808f 100644
--- a/ui/qt/interface_tree.cpp
+++ b/ui/qt/interface_tree.cpp
@@ -59,10 +59,11 @@ InterfaceTree::InterfaceTree(QWidget *parent) :
if_list = capture_interface_list(&err, &err_str);
if_list = g_list_sort(if_list, if_list_comparator_alph);
- if (if_list == NULL && err == CANT_GET_INTERFACE_LIST) {
+ if (if_list == NULL) {
setDisabled(true);
ti = new QTreeWidgetItem();
ti->setText(0, QString(tr("No interfaces found\n%1")).arg(QString().fromUtf8(err_str)));
+ g_free(err_str);
addTopLevelItem(ti);
return;
} else if (err_str) {