summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-gif-animation.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-06-08 20:15:49 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-06-08 20:15:49 +0000
commit30d3e85d96550d9cc305757673b5a37948ad44c2 (patch)
treec25440df049ae76f458ff8c90fd0b3d0adfdbc3c /gdk-pixbuf/io-gif-animation.c
parent7009511a224b15f26e91d4fbf42ce9bbf5f013d1 (diff)
downloadgdk-pixbuf-30d3e85d96550d9cc305757673b5a37948ad44c2.tar.gz
remove bogus g_return_if_fail
2001-06-08 Havoc Pennington <hp@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): remove bogus g_return_if_fail * io-gif.c (gif_get_lzw): if delay time is 0 or smaller than likely timeout resolution, set it to an arbitrarily-chosen short delay. Fixes bug #55953 from warmenhoven@yahoo.com
Diffstat (limited to 'gdk-pixbuf/io-gif-animation.c')
-rw-r--r--gdk-pixbuf/io-gif-animation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c
index fe164a095..d334cc421 100644
--- a/gdk-pixbuf/io-gif-animation.c
+++ b/gdk-pixbuf/io-gif-animation.c
@@ -272,7 +272,7 @@ gdk_pixbuf_gif_anim_iter_advance (GdkPixbufAnimationIter *anim_iter,
elapsed =
(((iter->current_time.tv_sec - iter->start_time.tv_sec) * G_USEC_PER_SEC +
iter->current_time.tv_usec - iter->start_time.tv_usec)) / 1000;
-
+
if (elapsed < 0) {
/* Try to compensate; probably the system clock
* was set backwards
@@ -280,14 +280,14 @@ gdk_pixbuf_gif_anim_iter_advance (GdkPixbufAnimationIter *anim_iter,
iter->start_time = iter->current_time;
elapsed = 0;
}
+
+ g_assert (iter->gif_anim->total_time > 0);
/* See how many times we've already played the full animation,
* and subtract time for that.
*/
elapsed = elapsed % iter->gif_anim->total_time;
- g_assert (elapsed < iter->gif_anim->total_time);
-
iter->position = elapsed;
/* Now move to the proper frame */