summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xbm.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
commit987c182720e7390f1e9c4adbcd9a6db2c5bcaf52 (patch)
treedf259f797e250578dfc283fc4ee01e0ebe1fee5d /gdk-pixbuf/io-xbm.c
parentc1a583c289e808479a401adf967e4d09c88f8a06 (diff)
downloadgdk-pixbuf-987c182720e7390f1e9c4adbcd9a6db2c5bcaf52.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-xbm.c')
-rw-r--r--gdk-pixbuf/io-xbm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index 90d8120a1..5fe2cafdd 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -435,10 +435,11 @@ gdk_pixbuf__xbm_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 XBM image"));
return FALSE;
}