diff options
author | Paul Offord <paul.offord@advance7.com> | 2017-01-17 17:25:24 +0000 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2017-01-18 15:07:01 +0000 |
commit | cf941613da659ce2590ae51cdf90b78e8a5116c9 (patch) | |
tree | b89c96fd611e92aa22c8dac907c4b2d8e9d22d5d /ui/qt | |
parent | 3138dad72815d59da5f970354e77b81ed6cb3726 (diff) |
Fix Access Violation in plugin_if_mainwindow_get_ws_info(...)
Call to plugin_if_get_ws_info when no packets are being displayed
causes an Access Violation in plugin_if_mainwindow_get_ws_info
as the pointer in cf->current_frame is NULL.
Bug: 12973
Change-Id: I33e8fe6f3894963a6f1f1ec9aa9169f85e1e3b18
Reviewed-on: https://code.wireshark.org/review/19659
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/main_window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 4f53d81ada..01a6e3dd2a 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -171,7 +171,7 @@ static void plugin_if_mainwindow_get_ws_info(gconstpointer user_data) g_free(ws_info->cf_filename); ws_info->cf_filename = g_strdup(cf->filename); - if (cf->state == FILE_READ_DONE) { + if (cf->state == FILE_READ_DONE && cf->current_frame) { ws_info->cf_framenr = cf->current_frame->num; ws_info->frame_passed_dfilter = (cf->current_frame->flags.passed_dfilter == 1); } else { |