diff --git a/src/System/Files/image_files.cpp b/src/System/Files/image_files.cpp index 0c9d7ae5af..d62eecdf2c 100644 --- a/src/System/Files/image_files.cpp +++ b/src/System/Files/image_files.cpp @@ -181,12 +181,14 @@ ps_load (url image, bool conv) { #endif string s = "", suf= suffix (image); - if (suf == "ps" || suf == "eps") - load_string (image, s, false); - else + if (suf == "ps" || suf == "eps") { + load_string (name, s, false); + } else { if (conv) s= image_to_psdoc (image); // call converters, then load resulting ps - - if (s == "") load_string ("$TEXMACS_PATH/misc/pixmaps/unknown.png", s, true); + } + + if (is_empty (s)) + load_string ("$TEXMACS_PATH/misc/pixmaps/unknown.png", s, true); return s; }