forked from osmocom/wireshark
Follow Stream: Allow using spin boxes with no packets visible
It's only necessary to check that cap_file_.capFile()->edt is not NULL if use_stream_index is FALSE. This prevents failure and an inaccurate error message about the capture file being invalid when using the spinbox to cycle through a stream when all packets are filtered out.(E.g., Follow a stream, append to the filter looking for something, no packets match, try to go to the next stream.)
This commit is contained in:
parent
2939c6d0dc
commit
9d716d793c
|
@ -957,13 +957,12 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_stream_index,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (cap_file_.capFile()->edt == NULL)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error following stream."), tr("Capture file invalid."));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!use_stream_index) {
|
||||
if (cap_file_.capFile()->edt == NULL)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error following stream."), tr("Capture file invalid."));
|
||||
return false;
|
||||
}
|
||||
is_follower = proto_is_frame_protocol(cap_file_.capFile()->edt->pi.layers, proto_get_protocol_filter_name(get_follow_proto_id(follower_)));
|
||||
if (!is_follower) {
|
||||
QMessageBox::warning(this, tr("Error following stream."), tr("Please make sure you have a %1 packet selected.").arg
|
||||
|
|
Loading…
Reference in New Issue