gtkhtml r9044 - branches/gnome-2-24/gtkhtml
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r9044 - branches/gnome-2-24/gtkhtml
- Date: Wed, 5 Nov 2008 10:22:18 +0000 (UTC)
Author: mcrha
Date: Wed Nov 5 10:22:18 2008
New Revision: 9044
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9044&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:
branches/gnome-2-24/gtkhtml/ChangeLog
branches/gnome-2-24/gtkhtml/htmlimage.c
Modified: branches/gnome-2-24/gtkhtml/htmlimage.c
==============================================================================
--- branches/gnome-2-24/gtkhtml/htmlimage.c (original)
+++ branches/gnome-2-24/gtkhtml/htmlimage.c Wed Nov 5 10:22:18 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]