Ethereal-dev: Re: [Ethereal-dev] Problems with "Save Highlighted Data..."

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Kai Krueger <kai@xxxxxxxxxxxxxx>
Date: Thu, 18 Dec 2003 19:18:42 +0100
Richard Sharpe wrote:

OK, that sounds like the correct fix. Please send the patch.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com


Here comes the 2 line patch moving the gtk_destroy_wiget() to the end of the function.

Kai
? save_higlighted.patch
Index: proto_draw.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/proto_draw.c,v
retrieving revision 1.73
diff -u -r1.73 proto_draw.c
--- proto_draw.c	17 Dec 2003 23:41:10 -0000	1.73
+++ proto_draw.c	18 Dec 2003 19:09:05 -0000
@@ -871,8 +871,6 @@
 
 	file = (char *)gtk_entry_get_text(GTK_ENTRY(file_entry));
 
-	/* Get rid of the dialog box */
-	gtk_widget_destroy(GTK_WIDGET(savehex_dlg));
 	if (!file ||! *file) {
 	  return;    /* XXX, put up an error box */
 	}
@@ -902,6 +900,9 @@
 	}
 	write(fd, data_p + start, end - start);
 	close(fd);
+
+	/* Get rid of the dialog box */
+	gtk_widget_destroy(GTK_WIDGET(savehex_dlg));
 }