diff options
author | Michael Mann <mmann78@netscape.net> | 2017-05-25 14:36:44 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-05-25 22:14:45 +0000 |
commit | 9bd2b63968ecde680cdee8e8eff43e526ef178f4 (patch) | |
tree | d52f0bf83161396c9aa244fe018616076f010a9a /ui/qt/compiled_filter_output.cpp | |
parent | f33363c38613d86432adb072f7debabb1f37424c (diff) | |
download | wireshark-9bd2b63968ecde680cdee8e8eff43e526ef178f4.tar.gz |
Don't try to compile capture filter if pcap_compile isn't available.
This is most likely due to WinPcap not being installed.
Bug: 13672
Change-Id: Ic7069f98c7f8068cdc5045204c2e23ab56b3f7eb
Reviewed-on: https://code.wireshark.org/review/21757
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt/compiled_filter_output.cpp')
-rw-r--r-- | ui/qt/compiled_filter_output.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp index 43096aa1df..ca718259a4 100644 --- a/ui/qt/compiled_filter_output.cpp +++ b/ui/qt/compiled_filter_output.cpp @@ -89,6 +89,8 @@ void CompiledFilterOutput::compileFilter() continue; } else { pcap_t *pd = pcap_open_dead(device.active_dlt, WTAP_MAX_PACKET_SIZE); + if (pd == NULL) + break; g_mutex_lock(pcap_compile_mtx); if (pcap_compile(pd, &fcode, compile_filter_.toUtf8().constData(), 1, 0) < 0) { compile_results.insert(interfaces, QString("%1").arg(g_strdup(pcap_geterr(pd)))); |