diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-04-25 00:18:06 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-04-25 00:18:06 +0000 |
commit | b02c42887749f554318d1c06175977270d4782b2 (patch) | |
tree | bedc7d99d793a1015ff7f17723830d2ff57d19ab /gtk/capture_if_details_dlg.c | |
parent | c2d7e088f37c5dd606973c39616537cd88fed037 (diff) | |
download | wireshark-b02c42887749f554318d1c06175977270d4782b2.tar.gz |
bugifx (should be copied to the 1.0 trunk): don't crash, if the interface hardware in question was removed since the list of interfaces was generated (NULL pointer returned from wpcap_packet_open() caused a crash)
svn path=/trunk/; revision=17987
Diffstat (limited to 'gtk/capture_if_details_dlg.c')
-rw-r--r-- | gtk/capture_if_details_dlg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/capture_if_details_dlg.c b/gtk/capture_if_details_dlg.c index cbe92f44df..b5b56007bc 100644 --- a/gtk/capture_if_details_dlg.c +++ b/gtk/capture_if_details_dlg.c @@ -1766,6 +1766,12 @@ capture_if_details_open_win(char *iface) /* open the network adapter */ adapter = wpcap_packet_open(iface); + if(adapter == NULL) { + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, + PRIMARY_TEXT_START "Could not open adapter: %s!" PRIMARY_TEXT_END + "\n\nThe adapter might be removed from the system in the meantime!", iface); + return; + } /* open a new window */ details_open_w = window_new(GTK_WINDOW_TOPLEVEL, "Ethereal: Interface Details"); |