Don't call get_interface_descriptive_name() on a NULL iface: fixes a segfault when...
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 4 Sep 2007 22:13:26 +0000 (22:13 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 4 Sep 2007 22:13:26 +0000 (22:13 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22788 f5534014-38df-0310-8fa8-9805f1628bb7

capture_ui_utils.c

index 78c4e55909a2acb804ee0c06820a0431f9e00b75..29cc38e7fb973b6cd86939067b5600ced55a814a 100644 (file)
@@ -358,7 +358,7 @@ get_if_name(const char *if_text)
 const char *
 get_iface_description(capture_options *capture_opts)
 {
-       if (!capture_opts->iface_descr)
+       if (!capture_opts->iface_descr && capture_opts->iface)
                capture_opts->iface_descr = get_interface_descriptive_name(capture_opts->iface);
 
        return(capture_opts->iface_descr);