Make sure a preference exists before we try to use it.

svn path=/trunk/; revision=18961
This commit is contained in:
Gerald Combs 2006-08-20 01:19:56 +00:00
parent 84112e7167
commit a238f1f7ac
1 changed files with 4 additions and 1 deletions

View File

@ -595,11 +595,14 @@ GList* popdown_if_list = NULL;
GList* curr = NULL;
gchar* s;
airpcap_if_info_t* if_info;
airpcap_if_info_t* if_info = NULL;
if(prefs.capture_device != NULL)
{
s = g_strdup(get_if_name(prefs.capture_device));
if_info = get_airpcap_if_by_name(airpcap_if_list,g_strdup(get_if_name(prefs.capture_device)));
g_free(s);
}
return if_info;
}