GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
struct image_cache *c = FRAME_IMAGE_CACHE (f);
ptrdiff_t i;
+ if (!c)
+ c = FRAME_IMAGE_CACHE (f) = make_image_cache ();
+
/* Find a free slot in c->images. */
for (i = 0; i < c->used; ++i)
if (c->images[i] == NULL)
{
img->lisp_data
= Fcons (make_number (ext->Function),
- Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount),
+ Fcons (make_unibyte_string ((char *) ext->Bytes,
+ ext->ByteCount),
img->lisp_data));
if (ext->Function == GIF_LOCAL_DESCRIPTOR_EXTENSION
&& ext->ByteCount == 4)