summaryrefslogtreecommitdiff
path: root/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff')
-rw-r--r--packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff108
1 files changed, 108 insertions, 0 deletions
diff --git a/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff b/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
index e69de29bb2..d030ae30b8 100644
--- a/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
+++ b/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
@@ -0,0 +1,108 @@
+--- gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2003-06-27 05:38:43.000000000 +0300
++++ gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2005-04-06 16:19:35.595127080 +0300
+@@ -391,6 +391,11 @@
+
+ while (tmp != NULL) {
+ GdkPixbufFrame *f = tmp->data;
++
++ if (f->pixbuf == NULL) {
++ return;
++ }
++
+ gint clipped_width = MIN (gif_anim->width - f->x_offset, gdk_pixbuf_get_width (f->pixbuf));
+ gint clipped_height = MIN (gif_anim->height - f->y_offset, gdk_pixbuf_get_height (f->pixbuf));
+
+@@ -414,6 +419,10 @@
+ TRUE,
+ 8, gif_anim->width, gif_anim->height);
+
++ if (f->composited == NULL) {
++ return;
++ }
++
+ /* alpha gets dumped if f->composited has no alpha */
+
+ gdk_pixbuf_fill (f->composited,
+@@ -453,9 +462,18 @@
+
+ if (prev_frame->action == GDK_PIXBUF_FRAME_RETAIN) {
+ f->composited = gdk_pixbuf_copy (prev_frame->composited);
++
++ if (f->composited == NULL) {
++ return;
++ }
+
+ } else if (prev_frame->action == GDK_PIXBUF_FRAME_DISPOSE) {
+ f->composited = gdk_pixbuf_copy (prev_frame->composited);
++
++ if (f->composited == NULL) {
++ return;
++ }
++
+ if (prev_clipped_width > 0 && prev_clipped_height > 0) {
+ /* Clear area of previous frame to background */
+ GdkPixbuf *area;
+@@ -465,6 +483,10 @@
+ prev_frame->y_offset,
+ prev_clipped_width,
+ prev_clipped_height);
++
++ if (area == NULL) {
++ return;
++ }
+
+ gdk_pixbuf_fill (area,
+ (gif_anim->bg_red << 24) |
+@@ -475,7 +497,13 @@
+ }
+ } else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) {
+ f->composited = gdk_pixbuf_copy (prev_frame->composited);
+- if (prev_clipped_width > 0 && prev_clipped_height > 0) {
++
++ if (f->composited == NULL) {
++ return;
++ }
++
++ if (prev_frame->revert != NULL &&
++ prev_clipped_width > 0 && prev_clipped_height > 0) {
+ /* Copy in the revert frame */
+ gdk_pixbuf_copy_area (prev_frame->revert,
+ 0, 0,
+@@ -500,14 +528,23 @@
+ f->y_offset,
+ clipped_width,
+ clipped_height);
+-
++
++ if (area == NULL) {
++ return;
++ }
++
+ f->revert = gdk_pixbuf_copy (area);
+-
++
+ g_object_unref (area);
++
++ if (f->revert == NULL) {
++ return;
++ }
+ }
+ }
+
+- if (clipped_width > 0 && clipped_height > 0) {
++ if (clipped_width > 0 && clipped_height > 0 &&
++ f->pixbuf != NULL && f->composited != NULL) {
+ /* Put current frame onto f->composited */
+ gdk_pixbuf_composite (f->pixbuf,
+ f->composited,
+@@ -531,10 +568,6 @@
+ tmp = tmp->next;
+ }
+ }
+-
+- g_assert (frame->composited != NULL);
+- g_assert (gdk_pixbuf_get_width (frame->composited) == gif_anim->width);
+- g_assert (gdk_pixbuf_get_height (frame->composited) == gif_anim->height);
+ }
+
+ GdkPixbuf*