diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2012-04-02 17:15:58 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2012-04-02 17:15:58 +0000 |
commit | 937df7af1845b454ac95f780d00c4b3f877adb5b (patch) | |
tree | 0ba50c1e01af775b5cf440acb19c62c91e962f84 /ui/gtk | |
parent | 95bd0745b91bf8e41a0fbda33d0a260b778224a1 (diff) |
From Irene Ruengeler: Fix a warning when capturing.
svn path=/trunk/; revision=41897
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/capture_dlg.c | 12 | ||||
-rw-r--r-- | ui/gtk/capture_if_dlg.c | 10 | ||||
-rw-r--r-- | ui/gtk/main_welcome.c | 3 |
3 files changed, 16 insertions, 9 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index 14a59159d3..75d5ca707c 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -239,7 +239,8 @@ void capture_stop_cb(GtkWidget *w _U_, gpointer d _U_) { #ifdef HAVE_AIRPCAP - airpcap_set_toolbar_stop_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_stop_capture(airpcap_if_active); #endif capture_stop(&global_capture_opts); @@ -250,7 +251,8 @@ void capture_restart_cb(GtkWidget *w _U_, gpointer d _U_) { #ifdef HAVE_AIRPCAP - airpcap_set_toolbar_start_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_start_capture(airpcap_if_active); #endif capture_restart(&global_capture_opts); @@ -4176,7 +4178,8 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_) #ifdef HAVE_AIRPCAP airpcap_if_active = airpcap_if_selected; - airpcap_set_toolbar_start_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_start_capture(airpcap_if_active); #endif if (cap_open_w) { @@ -4619,7 +4622,8 @@ capture_prep_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_) #ifdef HAVE_AIRPCAP /* update airpcap toolbar */ - airpcap_set_toolbar_stop_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_stop_capture(airpcap_if_active); #endif #ifdef HAVE_PCAP_REMOTE diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c index 37112c156a..439b30f170 100644 --- a/ui/gtk/capture_if_dlg.c +++ b/ui/gtk/capture_if_dlg.c @@ -378,7 +378,8 @@ capture_if_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_) /* Note that we no longer have a "Capture Options" dialog box. */ cap_if_w = NULL; #ifdef HAVE_AIRPCAP - airpcap_set_toolbar_stop_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_stop_capture(airpcap_if_active); #endif } @@ -660,12 +661,13 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) airpcap_enable_toolbar_widgets(airpcap_tb,FALSE); } else { /* default adapter is not airpcap... or is airpcap but is not found*/ - airpcap_set_toolbar_stop_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_stop_capture(airpcap_if_active); airpcap_enable_toolbar_widgets(airpcap_tb,FALSE); } } - - airpcap_set_toolbar_start_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_start_capture(airpcap_if_active); #endif make_gtk_array(); diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c index 97fef8b739..bb7a447e19 100644 --- a/ui/gtk/main_welcome.c +++ b/ui/gtk/main_welcome.c @@ -1180,7 +1180,8 @@ static void capture_if_start(GtkWidget *w _U_, gpointer data _U_) break; } } - airpcap_set_toolbar_start_capture(airpcap_if_active); + if (airpcap_if_active) + airpcap_set_toolbar_start_capture(airpcap_if_active); #endif capture_start_cb(NULL, NULL); } |