diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-09-10 06:55:28 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-09-10 06:55:28 +0000 |
commit | 29ea42f8689cd661802f8e693ec964efc923c913 (patch) | |
tree | 8be30f8b1dc0fe47aa0c78037fd82f17077a8854 /gtk/capture_prefs.c | |
parent | 0de9c67adf0133cd6436ed963613f0729cb0eacd (diff) |
If we have no interfaces, don't set the popdown list for interface combo
boxes.
svn path=/trunk/; revision=8443
Diffstat (limited to 'gtk/capture_prefs.c')
-rw-r--r-- | gtk/capture_prefs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/capture_prefs.c b/gtk/capture_prefs.c index ac1730bf9c..4fdc50ca45 100644 --- a/gtk/capture_prefs.c +++ b/gtk/capture_prefs.c @@ -1,7 +1,7 @@ /* capture_prefs.c * Dialog box for capture preferences * - * $Id: capture_prefs.c,v 1.21 2003/09/10 05:35:26 guy Exp $ + * $Id: capture_prefs.c,v 1.22 2003/09/10 06:55:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -113,8 +113,10 @@ capture_prefs_show(void) if_list = get_interface_list(&err, err_str); combo_list = build_capture_combo_list(if_list, FALSE); free_interface_list(if_list); - gtk_combo_set_popdown_strings(GTK_COMBO(if_cb), combo_list); - free_capture_combo_list(combo_list); + if (combo_list != NULL) { + gtk_combo_set_popdown_strings(GTK_COMBO(if_cb), combo_list); + free_capture_combo_list(combo_list); + } if (prefs.capture_device) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(if_cb)->entry), prefs.capture_device); |