aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/image.c10
-rw-r--r--src/w32image.c1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c
index ffe2f607e52..c8a192aaaf1 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6308,14 +6308,16 @@ native_image_p (Lisp_Object object)
6308static bool 6308static bool
6309native_image_load (struct frame *f, struct image *img) 6309native_image_load (struct frame *f, struct image *img)
6310{ 6310{
6311 Lisp_Object image_file = image_spec_value (img->spec, QCfile, NULL);
6312
6313 if (STRINGP (image_file))
6314 image_file = image_find_image_file (image_file);
6311 6315
6312# ifdef HAVE_NTGUI 6316# ifdef HAVE_NTGUI
6313 return w32_load_image (f, img, 6317 return w32_load_image (f, img, image_file,
6314 image_spec_value (img->spec, QCfile, NULL),
6315 image_spec_value (img->spec, QCdata, NULL)); 6318 image_spec_value (img->spec, QCdata, NULL));
6316# elif defined HAVE_NS 6319# elif defined HAVE_NS
6317 return ns_load_image (f, img, 6320 return ns_load_image (f, img, image_file,
6318 image_spec_value (img->spec, QCfile, NULL),
6319 image_spec_value (img->spec, QCdata, NULL)); 6321 image_spec_value (img->spec, QCdata, NULL));
6320# else 6322# else
6321 return 0; 6323 return 0;
diff --git a/src/w32image.c b/src/w32image.c
index 8d39a09dc7e..70b2eb29b87 100644
--- a/src/w32image.c
+++ b/src/w32image.c
@@ -414,7 +414,6 @@ w32_load_image (struct frame *f, struct image *img,
414 and succeeded. We have a valid token and GDI+ is active. */ 414 and succeeded. We have a valid token and GDI+ is active. */
415 if (STRINGP (spec_file)) 415 if (STRINGP (spec_file))
416 { 416 {
417 spec_file = ENCODE_FILE (spec_file);
418 const char *fn = map_w32_filename (SSDATA (spec_file), NULL); 417 const char *fn = map_w32_filename (SSDATA (spec_file), NULL);
419 wchar_t filename_w[MAX_PATH]; 418 wchar_t filename_w[MAX_PATH];
420 filename_to_utf16 (fn, filename_w); 419 filename_to_utf16 (fn, filename_w);