diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-12-07 18:21:58 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-12-07 18:21:58 +0000 |
commit | 42dd01daff429d1dc39b1049387dc00db8e3a9c8 (patch) | |
tree | 133c880e564945db79f215c1d6975a27acf672a1 /capture-wpcap.c | |
parent | 7aa873dae668f5343b6a8d1dde9059f9669d5d23 (diff) |
If WinPcap isn't loaded, return NULL from pcap_lookupdev() instead
of asserting. Returning an empty interface list is more graceful than
crashing.
svn path=/trunk/; revision=31188
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r-- | capture-wpcap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c index 8f7815488c..1c925e2bfe 100644 --- a/capture-wpcap.c +++ b/capture-wpcap.c @@ -213,7 +213,9 @@ load_wpcap(void) char* pcap_lookupdev (char *a) { - g_assert(has_wpcap); + if (!has_wpcap) { + return NULL; + } return p_pcap_lookupdev(a); } |