summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/eom-image-jpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eom-image-jpeg.c b/src/eom-image-jpeg.c
index 576df36..7eb24f3 100644
--- a/src/eom-image-jpeg.c
+++ b/src/eom-image-jpeg.c
@@ -89,12 +89,13 @@ fatal_error_handler (j_common_ptr cinfo)
* crappy JPEG library
*/
if (errmgr->error && *errmgr->error == NULL) {
+ gchar *str = g_path_get_basename (errmgr->filename);
g_set_error (errmgr->error,
0,
0,
"Error interpreting JPEG image file: %s\n\n%s",
- g_path_get_basename (errmgr->filename),
- buffer);
+ str, buffer);
+ g_free (str);
}
siglongjmp (errmgr->setjmp_buffer, 1);