gtkhtml r9112 - branches/gnome-2-24/gtkhtml



Author: abharath
Date: Thu Jan 22 03:49:23 2009
New Revision: 9112
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9112&view=rev

Log:
2009-01-22  Bharath Acharya  <abharath novell com>

       ** Fix for bug #464064 (BNC)

       * htmlengine-edit-table.c (table_set_bg_color_undo_action): The undo 
       for the second iteration makes table go null. Just have a check to 
       prevent the unwanted call.

       The bugzilla report.
       Steps
       -> open a new composer window.
       -> create a table with background color.
       -> type few characters.
       -> now do ctrl+z till all the characters are removed.
       -> evolution will crash at the end.


Modified:
   branches/gnome-2-24/gtkhtml/ChangeLog
   branches/gnome-2-24/gtkhtml/htmlengine-edit-table.c

Modified: branches/gnome-2-24/gtkhtml/htmlengine-edit-table.c
==============================================================================
--- branches/gnome-2-24/gtkhtml/htmlengine-edit-table.c	(original)
+++ branches/gnome-2-24/gtkhtml/htmlengine-edit-table.c	Thu Jan 22 03:49:23 2009
@@ -840,8 +840,12 @@
 table_set_bg_color_undo_action (HTMLEngine *e, HTMLUndoData *undo_data, HTMLUndoDirection dir, guint position_after)
 {
 	HTMLTableSetAttrUndo *data = (HTMLTableSetAttrUndo *) undo_data;
+	HTMLTable *table = html_engine_get_table (e);
+
+	if (!table)
+		return;
 
-	table_set_bg_color (e, html_engine_get_table (e), data->attr.color.has_bg_color
+	table_set_bg_color (e, table, data->attr.color.has_bg_color
 			    ? &data->attr.color.color : NULL, html_undo_direction_reverse (dir));
 }
 



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