Index: htmlgdkpainter.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlgdkpainter.c,v
retrieving revision 1.152
diff -u -p -r1.152 htmlgdkpainter.c
--- htmlgdkpainter.c	13 Jul 2005 10:19:32 -0000	1.152
+++ htmlgdkpainter.c	2 Nov 2006 17:46:13 -0000
@@ -108,7 +108,10 @@ begin (HTMLPainter *painter, int x1, int
 		const int width = x2 - x1 + 1;
 		const int height = y2 - y1 + 1;
 
-		g_assert (gdk_painter->pixmap == NULL);
+
+		/* FIXME: Ideally it should be NULL before coming here. */
+		if (gdk_painter->pixmap && gdk_painter->pixmap != gdk_painter->window)
+			g_object_unref (gdk_painter->pixmap);
 
 		gdk_painter->pixmap = gdk_pixmap_new (gdk_painter->window, width, height, -1);
 		gdk_painter->x1 = x1;
