Fix to avoid protection exception in cf_goto_frame
A call to plugin_if_goto_frame when there is no capture file loaded causes a protection exception in cf_goto_file. This fix avoids that problem. Bug: 11810 Change-Id: I7e6f31690a4b0d8d4252b41d8d438979cb253050 Reviewed-on: https://code.wireshark.org/review/12306 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
dde90234c9
commit
f15bc8f78e
6
file.c
6
file.c
|
@ -3474,6 +3474,12 @@ 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*/
|
||||
statusbar_push_temporary_msg("There is no file loaded");
|
||||
return FALSE; /* we failed to go to that packet */
|
||||
}
|
||||
|
||||
fdata = frame_data_sequence_find(cf->frames, fnumber);
|
||||
|
||||
if (fdata == NULL) {
|
||||
|
|
Loading…
Reference in New Issue