emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ad46070: Fixed problems with svg_load_image -- no m


From: Ulf Jasper
Subject: [Emacs-diffs] master ad46070: Fixed problems with svg_load_image -- no more crashes (hopefully)
Date: Wed, 17 Dec 2014 21:00:42 +0000

branch: master
commit ad46070e421a02cb7aaf6b81b11b4ba33d403b3c
Author: Ulf Jasper <address@hidden>
Commit: Ulf Jasper <address@hidden>

    Fixed problems with svg_load_image -- no more crashes (hopefully)
    
    * 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 |    5 +++++
 src/image.c   |    5 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 455ec1e..3854803 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
 2014-12-17  Ulf Jasper  <address@hidden>
 
+       * 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  <address@hidden>
+
        Partially disabled previous change.
 
        * image.c (svg_load): Temporarily disabled filename thing for
diff --git a/src/image.c b/src/image.c
index 954d664..ceec3ce 100644
--- a/src/image.c
+++ b/src/image.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]