[gtkhtml/gnome-2-30] Bug #607324 - Crash doing table editing.



commit e8b22ca78e7637b24e912184f418430b51223b26
Author: Bharath Acharya <abharath novell com>
Date:   Wed Jun 9 09:34:59 2010 +0530

    Bug #607324 - Crash doing table editing.
    
    Double free fixes.

 gtkhtml/htmlengine-edit-table.c |    3 ++-
 gtkhtml/htmlobject.c            |    2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtkhtml/htmlengine-edit-table.c b/gtkhtml/htmlengine-edit-table.c
index c4e7fad..09c1923 100644
--- a/gtkhtml/htmlengine-edit-table.c
+++ b/gtkhtml/htmlengine-edit-table.c
@@ -315,7 +315,8 @@ delete_cells_undo_destroy (HTMLUndoData *undo_data)
 	gint i;
 
 	for (i = 0; i < data->size; i ++)
-		html_object_destroy (HTML_OBJECT (data->cells [i]));
+		if (data->cells [i])
+			html_object_destroy (HTML_OBJECT (data->cells [i]));
 	g_free(data->cells);
 }
 
diff --git a/gtkhtml/htmlobject.c b/gtkhtml/htmlobject.c
index 62114bc..1d9d128 100644
--- a/gtkhtml/htmlobject.c
+++ b/gtkhtml/htmlobject.c
@@ -76,8 +76,6 @@ destroy (HTMLObject *self)
 
 	if (self->redraw_pending) {
 		self->free_pending = TRUE;
-	} else {
-		g_free (self);
 	}
 }
 



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