diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-07 22:41:17 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-07 22:41:17 +0000 |
commit | 86c54539f552dbd706c6c0a3b0ac19d49a893e29 (patch) | |
tree | 3a3cfaa7e59a43c96bc6e185e734ab331a11d14c /airpcap_loader.c | |
parent | 9791a5761cdaacb9c8a31f6f09b496a589ea2d4f (diff) |
don't crash, if airpcap.dll isn't available
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19448 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'airpcap_loader.c')
-rw-r--r-- | airpcap_loader.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/airpcap_loader.c b/airpcap_loader.c index 92eb5f9cc4..d65b06904b 100644 --- a/airpcap_loader.c +++ b/airpcap_loader.c @@ -385,13 +385,19 @@ get_airpcap_interface_list(int *err, char *err_str) GList *il = NULL; airpcap_if_info_t *if_info; int i, n_adapts; - AirpcapDeviceDescription *devsList, *adListEntry; + AirpcapDeviceDescription *devsList, *adListEntry; + + if(g_PAirpcapGetDeviceList == NULL) { + /* Airpcap.dll not available */ + *err = NO_AIRPCAP_INTERFACES_FOUND; + return NULL; + } if(!g_PAirpcapGetDeviceList(&devsList, err_str)) { - /* No interfaces, return il = NULL; */ + /* No interfaces */ *err = NO_AIRPCAP_INTERFACES_FOUND; - return il; + return NULL; } /* |