Revert: Free cf->edt before free cf->epan when redissecting.

Instead of freeing cf->edt before clearing the packet list, add an extra
check to MainWindow::setMenusForSelectedTreeRow. Semi-blind attempt at
fixing bug 11719.

This reverts commit 8c211d51ef.
This reverts commit da71ccbf77.

Bug: 11719
Change-Id: Ifd07be414ffd03a40bdfa7110395c9542bd86fc4
Reviewed-on: https://code.wireshark.org/review/11943
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-11-18 09:01:00 -08:00
parent bdea0d4504
commit 3d3eb159a7
2 changed files with 1 additions and 5 deletions

4
file.c
View File

@ -1623,10 +1623,6 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, gb
cf->redissecting = TRUE;
/* 'reset' dissection session */
if (cf->edt) {
epan_dissect_free(cf->edt);
cf->edt = NULL;
}
epan_free(cf->epan);
cf->epan = ws_epan_new(cf);
cf->cinfo.epan = cf->epan;

View File

@ -1265,7 +1265,7 @@ void MainWindow::setMenusForSelectedTreeRow(field_info *fi) {
bool enable = false;
QString filter;
if (capture_file_.capFile() && capture_file_.capFile()->edt) {
if (fi && capture_file_.capFile() && capture_file_.capFile()->edt) {
enable = conv_filter->is_filter_valid(&capture_file_.capFile()->edt->pi);
filter = conv_filter->build_filter_string(&capture_file_.capFile()->edt->pi);
}