aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_if_details_dlg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/capture_if_details_dlg.c')
-rw-r--r--gtk/capture_if_details_dlg.c6
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");