diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-12-07 18:21:58 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-12-07 18:21:58 +0000 |
commit | bbb0bdcd6f5253b66aafb96c34858361ecd52f31 (patch) | |
tree | 133c880e564945db79f215c1d6975a27acf672a1 /capture-wpcap.c | |
parent | e8d9219051eda82c93c8bc09547b79769dfcd8aa (diff) |
If WinPcap isn't loaded, return NULL from pcap_lookupdev() instead
of asserting. Returning an empty interface list is more graceful than
crashing.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31188 f5534014-38df-0310-8fa8-9805f1628bb7
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); } |