diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-03-20 20:09:51 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-03-20 20:09:51 +0000 |
commit | 2d281ed53dd66e06fd1e2f095f50264f5020700f (patch) | |
tree | 35e85543ad5e3f2ce7bd20bda8c76877d63354c3 /gdk-pixbuf/io-gif.c | |
parent | 5e66f6aa7545e4eb3e2a4f53b14ce329901427c1 (diff) | |
download | gtk+-2d281ed53dd66e06fd1e2f095f50264f5020700f.tar.gz |
Always save errno to a temporary before making other calls. (#335179,
2006-03-20 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-animation.c:
* gdk-pixbuf-io.c:
* io-xpm.c:
* io-xbm.c:
* io-gif.c: Always save errno to a temporary before making
other calls. (#335179, Morten Welinder)
Diffstat (limited to 'gdk-pixbuf/io-gif.c')
-rw-r--r-- | gdk-pixbuf/io-gif.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index 886ef9a594..74fab8cc6e 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -214,11 +214,14 @@ gif_read (GifContext *context, guchar *buffer, size_t len) #endif retval = (fread(buffer, len, 1, context->file) != 0); - if (!retval && ferror (context->file)) + if (!retval && ferror (context->file)) { + gint save_errno = errno; g_set_error (context->error, G_FILE_ERROR, - g_file_error_from_errno (errno), - _("Failure reading GIF: %s"), strerror (errno)); + g_file_error_from_errno (save_errno), + _("Failure reading GIF: %s"), + strerror (save_errno)); + } #ifdef IO_GIFDEBUG if (len < 100) { |