]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed problems with svg_load_image -- no more crashes (hopefully)
authorUlf Jasper <ulf.jasper@web.de>
Wed, 17 Dec 2014 21:00:22 +0000 (22:00 +0100)
committerUlf Jasper <ulf.jasper@web.de>
Wed, 17 Dec 2014 21:00:22 +0000 (22:00 +0100)
* src/image.c (svg_load): Watch out for nil value of current buffer's
filename.  Re-enable filename thing for not-a-file case.

src/ChangeLog
src/image.c

index 455ec1e8387743cb64fcf34bcd21f8fa610df5ca..3854803d843fe9111db7712f32a67f9cd3cce770 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-17  Ulf Jasper  <ulf.jasper@web.de>
+
+       * image.c (svg_load): Watch out for nil value of current buffer's
+       filename.  Re-enable filename thing for not-a-file case.
+
 2014-12-17  Ulf Jasper  <ulf.jasper@web.de>
 
        Partially disabled previous change.
index 954d66424d1b061c945c6ff7cbd663c5e117f7c2..ceec3ce46b198aa86eab24405740b73bc676d568 100644 (file)
@@ -8823,10 +8823,9 @@ svg_load (struct frame *f, struct image *img)
          return 0;
        }
       original_filename = BVAR (current_buffer, filename);
-      /* FIXME: disabled the filename thing for the time being as it
-         can cause crashs. */
       success_p = svg_load_image (f, img, SDATA (data), SBYTES (data),
-                                  NULL /* SDATA(original_filename) */);
+                                  NILP(original_filename) ?
+                                  NULL : SDATA(original_filename));
     }
 
   return success_p;