summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xpm.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-03-20 20:09:51 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-03-20 20:09:51 +0000
commit2d281ed53dd66e06fd1e2f095f50264f5020700f (patch)
tree35e85543ad5e3f2ce7bd20bda8c76877d63354c3 /gdk-pixbuf/io-xpm.c
parent5e66f6aa7545e4eb3e2a4f53b14ce329901427c1 (diff)
downloadgtk+-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-xpm.c')
-rw-r--r--gdk-pixbuf/io-xpm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index 3357aab4b5..8959a04836 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -769,10 +769,11 @@ gdk_pixbuf__xpm_image_load_increment (gpointer data,
g_return_val_if_fail (data != NULL, FALSE);
if (fwrite (buf, sizeof (guchar), size, context->file) != size) {
+ gint save_errno = errno;
context->all_okay = FALSE;
g_set_error (error,
G_FILE_ERROR,
- g_file_error_from_errno (errno),
+ g_file_error_from_errno (save_errno),
_("Failed to write to temporary file when loading XPM image"));
return FALSE;
}