From: Ulf Jasper Date: Wed, 17 Dec 2014 21:00:22 +0000 (+0100) Subject: Fixed problems with svg_load_image -- no more crashes (hopefully) X-Git-Tag: emacs-25.0.90~2635^2~48 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad46070e421a02cb7aaf6b81b11b4ba33d403b3c;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 455ec1e8387..3854803d843 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Ulf Jasper + + * 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 Partially disabled previous change. diff --git a/src/image.c b/src/image.c index 954d66424d1..ceec3ce46b1 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;