summaryrefslogtreecommitdiffstats
path: root/meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff')
-rw-r--r--meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff108
1 files changed, 108 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
new file mode 100644
index 0000000000..d030ae30b8
--- /dev/null
+++ b/meta/packages/gtk+/gtk+-2.6.4-1.osso7/io-gif-animation.c.diff
@@ -0,0 +1,108 @@
1--- gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2003-06-27 05:38:43.000000000 +0300
2+++ gtk+-2.6.4/gdk-pixbuf/io-gif-animation.c 2005-04-06 16:19:35.595127080 +0300
3@@ -391,6 +391,11 @@
4
5 while (tmp != NULL) {
6 GdkPixbufFrame *f = tmp->data;
7+
8+ if (f->pixbuf == NULL) {
9+ return;
10+ }
11+
12 gint clipped_width = MIN (gif_anim->width - f->x_offset, gdk_pixbuf_get_width (f->pixbuf));
13 gint clipped_height = MIN (gif_anim->height - f->y_offset, gdk_pixbuf_get_height (f->pixbuf));
14
15@@ -414,6 +419,10 @@
16 TRUE,
17 8, gif_anim->width, gif_anim->height);
18
19+ if (f->composited == NULL) {
20+ return;
21+ }
22+
23 /* alpha gets dumped if f->composited has no alpha */
24
25 gdk_pixbuf_fill (f->composited,
26@@ -453,9 +462,18 @@
27
28 if (prev_frame->action == GDK_PIXBUF_FRAME_RETAIN) {
29 f->composited = gdk_pixbuf_copy (prev_frame->composited);
30+
31+ if (f->composited == NULL) {
32+ return;
33+ }
34
35 } else if (prev_frame->action == GDK_PIXBUF_FRAME_DISPOSE) {
36 f->composited = gdk_pixbuf_copy (prev_frame->composited);
37+
38+ if (f->composited == NULL) {
39+ return;
40+ }
41+
42 if (prev_clipped_width > 0 && prev_clipped_height > 0) {
43 /* Clear area of previous frame to background */
44 GdkPixbuf *area;
45@@ -465,6 +483,10 @@
46 prev_frame->y_offset,
47 prev_clipped_width,
48 prev_clipped_height);
49+
50+ if (area == NULL) {
51+ return;
52+ }
53
54 gdk_pixbuf_fill (area,
55 (gif_anim->bg_red << 24) |
56@@ -475,7 +497,13 @@
57 }
58 } else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) {
59 f->composited = gdk_pixbuf_copy (prev_frame->composited);
60- if (prev_clipped_width > 0 && prev_clipped_height > 0) {
61+
62+ if (f->composited == NULL) {
63+ return;
64+ }
65+
66+ if (prev_frame->revert != NULL &&
67+ prev_clipped_width > 0 && prev_clipped_height > 0) {
68 /* Copy in the revert frame */
69 gdk_pixbuf_copy_area (prev_frame->revert,
70 0, 0,
71@@ -500,14 +528,23 @@
72 f->y_offset,
73 clipped_width,
74 clipped_height);
75-
76+
77+ if (area == NULL) {
78+ return;
79+ }
80+
81 f->revert = gdk_pixbuf_copy (area);
82-
83+
84 g_object_unref (area);
85+
86+ if (f->revert == NULL) {
87+ return;
88+ }
89 }
90 }
91
92- if (clipped_width > 0 && clipped_height > 0) {
93+ if (clipped_width > 0 && clipped_height > 0 &&
94+ f->pixbuf != NULL && f->composited != NULL) {
95 /* Put current frame onto f->composited */
96 gdk_pixbuf_composite (f->pixbuf,
97 f->composited,
98@@ -531,10 +568,6 @@
99 tmp = tmp->next;
100 }
101 }
102-
103- g_assert (frame->composited != NULL);
104- g_assert (gdk_pixbuf_get_width (frame->composited) == gif_anim->width);
105- g_assert (gdk_pixbuf_get_height (frame->composited) == gif_anim->height);
106 }
107
108 GdkPixbuf*