diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-12-27 22:50:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-12-27 22:50:45 +0000 |
commit | c0e9374d9ce4b49918564d305dc606ad6c3bf12b (patch) | |
tree | 36786dfc07f30228785dd333498cf83a870cad30 /gdk-pixbuf | |
parent | 661ec3189c8051367deaa41c82d58bb616abcaed (diff) | |
download | gtk+-c0e9374d9ce4b49918564d305dc606ad6c3bf12b.tar.gz |
gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file) Avoid
2004-12-27 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file)
Avoid deadlock. Pointed out by Callum McKenzie.
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 5 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-animation.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 0111c22007..2b453a37bc 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2004-12-27 Matthias Clasen <mclasen@redhat.com> + + * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file) + Avoid deadlock. Pointed out by Callum McKenzie. + Wed Dec 22 01:17:44 2004 Jonathan Blandford <jrb@redhat.com> * queryloaders.c (main): print out the version and binary name in diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c index 22bf245602..2e84d333ac 100644 --- a/gdk-pixbuf/gdk-pixbuf-animation.c +++ b/gdk-pixbuf/gdk-pixbuf-animation.c @@ -139,7 +139,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename, guchar buffer [128]; GdkPixbufModule *image_module; gchar *display_name; - gboolean locked; + gboolean locked = FALSE; g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); @@ -184,8 +184,6 @@ gdk_pixbuf_animation_new_from_file (const char *filename, return NULL; } - locked = _gdk_pixbuf_lock (image_module); - if (image_module->load_animation == NULL) { GdkPixbuf *pixbuf; @@ -221,6 +219,8 @@ gdk_pixbuf_animation_new_from_file (const char *filename, g_object_unref (pixbuf); } else { + locked = _gdk_pixbuf_lock (image_module); + fseek (f, 0, SEEK_SET); animation = (* image_module->load_animation) (f, error); |