summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorPaul Offord <paul.offord@advance7.com>2016-01-09 16:45:48 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-01-10 07:02:23 +0000
commit9c3044e1641a72b5c2b7b0959f28d9600c39f62a (patch)
tree8053c8a82a645dc960a1fe451a7c3d6098c12fe4 /file.c
parent2c830bbb6b3451345bd03ce18ab5bd48174d6084 (diff)
downloadwireshark-9c3044e1641a72b5c2b7b0959f28d9600c39f62a.tar.gz
GTK: plugin_if_goto_frame can cause an Access Violation
This is a fix for bug 11989. This patch fixes the problem for the GTK variant of Wireshark and matches the Qt bug reported by bug 11810 and fixed by change 12306. Bug: 11989 Change-Id: Ib9af8ba745394ebd31825003361ec637c45d75d6 Reviewed-on: https://code.wireshark.org/review/13152 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index ad3363c39b..44ff87b142 100644
--- a/file.c
+++ b/file.c
@@ -3463,8 +3463,8 @@ cf_goto_frame(capture_file *cf, guint fnumber)
{
frame_data *fdata;
- if (cf == NULL) {
- /* we don't have a loaded capture file - fix for bug 11810*/
+ if (cf == NULL || cf->frames == NULL) {
+ /* we don't have a loaded capture file - fix for bugs 11810 & 11989 */
statusbar_push_temporary_msg("There is no file loaded");
return FALSE; /* we failed to go to that packet */
}