[gdk-pixbuf] animation: gdk_pixbuf_animation_new_from_file() can't load PNG files
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] animation: gdk_pixbuf_animation_new_from_file() can't load PNG files
- Date: Tue, 19 Feb 2013 11:13:30 +0000 (UTC)
commit 42ab066bfeeee5047d411bcf2e1af9c977561b7c
Author: Benjamin Otte <otte redhat com>
Date: Tue Feb 19 12:09:29 2013 +0100
animation: gdk_pixbuf_animation_new_from_file() can't load PNG files
The code assumed that the prepare callback was called in the
begin_load() opeartion, which is not true. So we change the code to only
require that the prepare callback be called at all.
https://bugzilla.gnome.org/show_bug.cgi?id=694148
gdk-pixbuf/gdk-pixbuf-animation.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 2ea5405..38d30f5 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -224,7 +224,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
context = image_module->begin_load (NULL, prepared_notify, NULL, &animation, error);
- if (!context || !animation) {
+ if (!context) {
error = NULL;
goto fail_progressive_load;
}
@@ -248,6 +248,9 @@ fail_progressive_load:
g_free (display_name);
return NULL;
}
+
+ /* If there was no error, there must be an animation that was successfully loaded */
+ g_assert (animation);
} else {
GdkPixbuf *pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]