summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2014-06-19 17:42:37 -0400
committerJeff Morriss <jeff.morriss.ws@gmail.com>2014-06-19 21:48:23 +0000
commit4a5b04b1ed0e8fc74080b43d45f9805e68426414 (patch)
tree0c1864bce74fb03564479a1a0855a327c6bcb798
parentb1c025ab1d4750c6e6d65525f9cbea0c0f795a07 (diff)
downloadwireshark-4a5b04b1ed0e8fc74080b43d45f9805e68426414.tar.gz
Don't crash when closing the Summary window if the file has been closed.
Yes, this is a Gtk-UI fix but it's a one-liner and easy enough. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8715 Bug: 8715 Change-Id: I554b6c953e83ff3d8cb57029e844f2f481b751dd Reviewed-on: https://code.wireshark.org/review/2460 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> (cherry picked from commit a32dbae525386fbf2ed14d5d5b982f666ac42219) Reviewed-on: https://code.wireshark.org/review/2463
-rw-r--r--ui/gtk/summary_dlg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c
index 473ba17df3..b01a62138e 100644
--- a/ui/gtk/summary_dlg.c
+++ b/ui/gtk/summary_dlg.c
@@ -138,7 +138,7 @@ summary_ok_cb(GtkWidget *w _U_, GtkWidget *view)
GtkTextIter end_iter;
gchar *new_comment = NULL;
- if (view != NULL) {
+ if (view != NULL && cfile.filename != NULL) {
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_get_start_iter (buffer, &start_iter);
gtk_text_buffer_get_end_iter (buffer, &end_iter);