Commit 7574650a authored by Andreas Schwab's avatar Andreas Schwab
Browse files

Check all lisp types in image loader

* nsimage.m (ns_load_image): Check argument types.

* image.c: Remove all uses of gcpro.
(xpm_load): Check all lisp types.
(pbm_load): Likewise.
(png_load): Likewise.
(jpeg_load): Likewise.
(tiff_load): Likewise.
(gif_load): Likewise.
(imagemagick_load_image): Likewise.
(imagemagick_load): Likewise.
(svg_load): Likewise.
(gs_load): Likewise.
parent 5abf1556
2010-09-04 Andreas Schwab <schwab@linux-m68k.org>
* nsimage.m (ns_load_image): Check argument types.
* image.c: Remove all uses of gcpro.
(xpm_load): Check all lisp types.
(pbm_load): Likewise.
(png_load): Likewise.
(jpeg_load): Likewise.
(tiff_load): Likewise.
(gif_load): Likewise.
(imagemagick_load_image): Likewise.
(imagemagick_load): Likewise.
(svg_load): Likewise.
(gs_load): Likewise.
2010-09-04 Eli Zaretskii <eliz@gnu.org>
 
* w32uniscribe.c (uniscribe_shape): Update commentary. Don't
......
This diff is collapsed.
......@@ -83,19 +83,21 @@ Updated by Christian Limpach (chris@nice.ch)
ns_load_image (struct frame *f, struct image *img,
Lisp_Object spec_file, Lisp_Object spec_data)
{
EmacsImage *eImg;
EmacsImage *eImg = nil;
NSSize size;
NSTRACE (ns_load_image);
if (NILP (spec_data))
if (STRINGP (spec_file))
{
eImg = [EmacsImage allocInitFromFile: spec_file];
}
else
else if (STRINGP (spec_data))
{
NSData *data = [NSData dataWithBytes: SDATA (spec_data)
length: SBYTES (spec_data)];
NSData *data;
data = [NSData dataWithBytes: SDATA (spec_data)
length: SBYTES (spec_data)];
eImg = [[EmacsImage alloc] initWithData: data];
[eImg setPixmapData];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment