From a32dbae525386fbf2ed14d5d5b982f666ac42219 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Thu, 19 Jun 2014 17:42:37 -0400 Subject: 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 --- ui/gtk/summary_dlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') 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); -- cgit v1.2.3