PATCH: Bugfix to allow use of gnome file selector with gtkhtml



This patch fixes an issue with the gnoe file selector when gtkhtml is
enabled. Balsa would dump core when trying to save html parts of emails when
gtkhtml is compiled in.

Melanie
diff -b -B -r -u -P --exclude-from=ignore ../balsa-cvs-new/src/balsa-message.c ./src/balsa-message.c
--- ../balsa-cvs-new/src/balsa-message.c	Fri Aug 10 19:40:27 2001
+++ ./src/balsa-message.c	Fri Aug 10 23:44:16 2001
@@ -373,6 +373,7 @@
 
 	BalsaMessage *bm=info->bmessage;
 
+	g_return_if_fail(bm != NULL);
     g_return_if_fail(info != 0);
 
 	if(bm->fsel_global.dialog) {
@@ -1686,6 +1687,8 @@
     gchar **l = NULL, **lines = NULL, *line = NULL;
     gint quote_level = 0;
 
+	info->bmessage=bm;
+
     /* one-time compilation of a constant url_str expression */
     if (!url_reg) {
 	url_reg = g_malloc(sizeof(regex_t));
@@ -1833,6 +1836,7 @@
     GtkHTMLStream *stream;
     GtkWidget *html, *scroll;
 
+	info->bmessage=bm;
     scroll = gtk_scrolled_window_new(NULL, NULL);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll),
 				   GTK_POLICY_NEVER, GTK_POLICY_NEVER);
@@ -1870,6 +1874,9 @@
     g_return_if_fail(bm != NULL);
     g_return_if_fail(info != NULL);
     g_return_if_fail(info->body != NULL);
+
+	/* May be redundant here */
+	info->bmessage=bm;
 
     type = libbalsa_message_body_type(info->body);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]