summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-11-16 21:33:17 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2015-11-17 07:32:56 +0000
commit7a27de40385cdb104971789ba6dd895466639561 (patch)
tree1ae0f20e17f5de5f5a8df33b3c1662d6cbd83bb8 /ui
parent543d67783c5b88ffbf7ba7724c895664389b980c (diff)
downloadwireshark-7a27de40385cdb104971789ba6dd895466639561.tar.gz
Qt: setMenusForSelectedPacket when capture file is closed.
Moved setMenusForSelectedPacket() to captureFileClosed() because capture_file_.capFile() is still valid in captureFileClosing(). Menu items depending on is_ip, is_tcp, is_udp, is_sctp, is_ssl, is_rtp and is_lte_rlc must be disabled when closing the capture file because many of the dialogs does crash when launched without a valid frame selected. All dialogs should probably have a guard for this to avoid crashes, but that may be an exercise for an enhancement to add support for the dialogs to follow the current loaded capture file. Change-Id: If5837a355d08df76547572a25d46ffa539070de3 Reviewed-on: https://code.wireshark.org/review/11883 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> (cherry picked from commit 062e5b3118de4c4658f4379d3e84f273e3976a97) Reviewed-on: https://code.wireshark.org/review/11899
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_window_slots.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index b0470cfb76..5577689c0c 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -707,7 +707,6 @@ void MainWindow::captureFileRetapFinished()
void MainWindow::captureFileClosing() {
setMenusForCaptureFile(true);
setForCapturedPackets(false);
- setMenusForSelectedPacket();
setForCaptureInProgress(false);
// Reset expert information indicator
@@ -731,6 +730,7 @@ void MainWindow::captureFileClosed() {
main_ui_->statusBar->popFileStatus();
setTitlebarForSelectedTreeRow();
+ setMenusForSelectedPacket();
setMenusForSelectedTreeRow();
if (!global_capture_opts.multi_files_on)
@@ -1134,7 +1134,7 @@ void MainWindow::setMenusForSelectedPacket()
bool enable = false;
QString filter;
- if (capture_file_.capFile()->edt) {
+ if (capture_file_.capFile() && capture_file_.capFile()->edt) {
enable = conv_filter->is_filter_valid(&capture_file_.capFile()->edt->pi);
filter = gchar_free_to_qstring(conv_filter->build_filter_string(&capture_file_.capFile()->edt->pi));
}