summaryrefslogtreecommitdiff
path: root/ui/gtk/mtp3_summary.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-07-14 19:59:13 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-07-14 19:59:13 +0000
commit5ca89cfed3aa9f0498de2783673abc4c69b4271b (patch)
treec16138fa822824c667aab22aad77dd52b947f412 /ui/gtk/mtp3_summary.c
parent1ff8c1fcbaa77b2aab8146e0d2770eb4163792e9 (diff)
downloadwireshark-5ca89cfed3aa9f0498de2783673abc4c69b4271b.tar.gz
Sanity checks to avoid a crash if no file is open
svn path=/trunk/; revision=43717
Diffstat (limited to 'ui/gtk/mtp3_summary.c')
-rw-r--r--ui/gtk/mtp3_summary.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gtk/mtp3_summary.c b/ui/gtk/mtp3_summary.c
index 152de504bc..bc73fe7e58 100644
--- a/ui/gtk/mtp3_summary.c
+++ b/ui/gtk/mtp3_summary.c
@@ -280,6 +280,10 @@ void mtp3_sum_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_)
int tot_num_msus;
double tot_num_bytes;
+ if (cfile.state == FILE_CLOSED) {
+ return;
+ }
+
/* initialize the tally */
summary_fill_in(&cfile, &summary);