aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gtk/main.c')
-rw-r--r--ui/gtk/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 9563b22598..78c316538f 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2895,7 +2895,7 @@ main(int argc, char *argv[])
if (start_capture || list_link_layer_types) {
/* Did the user specify an interface to use? */
if (!capture_opts_trim_iface(&global_capture_opts,
- (prefs_p->capture_device) ? get_if_name(prefs_p->capture_device) : NULL)) {
+ ((prefs_p->capture_device) && (*prefs_p->capture_device != '\0')) ? get_if_name(prefs_p->capture_device) : NULL)) {
exit(2);
}
}
@@ -2945,7 +2945,7 @@ main(int argc, char *argv[])
#ifdef HAVE_LIBPCAP
if ((global_capture_opts.num_selected == 0) &&
- (prefs.capture_device != NULL)) {
+ (prefs.capture_device != NULL) && (*prefs_p->capture_device != '\0')) {
guint i;
interface_t device;
for (i = 0; i < global_capture_opts.all_ifaces->len; i++) {