gtkhtml r9043 - trunk/gtkhtml
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r9043 - trunk/gtkhtml
- Date: Wed,  5 Nov 2008 10:21:52 +0000 (UTC)
Author: mcrha
Date: Wed Nov  5 10:21:51 2008
New Revision: 9043
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9043&view=rev
Log:
2008-11-05  Milan Crha  <mcrha redhat com>
	** Fix for bug #338921
	* htmlimage.c: (html_image_factory_end_pixbuf):
	Do not crash when the interest in the image left before it was loaded.
Modified:
   trunk/gtkhtml/ChangeLog
   trunk/gtkhtml/htmlimage.c
Modified: trunk/gtkhtml/htmlimage.c
==============================================================================
--- trunk/gtkhtml/htmlimage.c	(original)
+++ trunk/gtkhtml/htmlimage.c	Wed Nov  5 10:21:51 2008
@@ -1120,12 +1120,16 @@
 	g_object_unref (ip->loader);
 	ip->loader = NULL;
 
-	update_or_redraw (ip);
-	if (ip->factory->engine->opened_streams && ip->factory->engine->block_images)
-		html_engine_opened_streams_decrement (ip->factory->engine);
-	/* printf ("IMAGE(%p) opened streams: %d\n", ip->factory->engine, ip->factory->engine->opened_streams); */
-	if (ip->factory->engine->opened_streams == 0 && ip->factory->engine->block && ip->factory->engine->block_images)
-		html_engine_schedule_update (ip->factory->engine);
+	/* if no ip->factory is set, then the image loading has been cancelled meanwhile, probably. */
+	if (ip->factory) {
+		update_or_redraw (ip);
+		if (ip->factory->engine->opened_streams && ip->factory->engine->block_images)
+			html_engine_opened_streams_decrement (ip->factory->engine);
+		/* printf ("IMAGE(%p) opened streams: %d\n", ip->factory->engine, ip->factory->engine->opened_streams); */
+		if (ip->factory->engine->opened_streams == 0 && ip->factory->engine->block && ip->factory->engine->block_images)
+			html_engine_schedule_update (ip->factory->engine);
+	}
+
 	html_image_pointer_unref (ip);
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]