Fix display of images on MS-Windows broken by a recent commit
* src/image.c (initialize_image_type): Test if the type is in Vlibrary_cache up front, and return true without calling the 'init' method if the type was already initialized.
This commit is contained in:
parent
b0a0705a4e
commit
721c520f36
1 changed files with 6 additions and 6 deletions
12
src/image.c
12
src/image.c
|
@ -9696,15 +9696,15 @@ static bool
|
|||
initialize_image_type (struct image_type const *type)
|
||||
{
|
||||
#ifdef WINDOWSNT
|
||||
bool (*init) (void) = type->init;
|
||||
Lisp_Object typesym = builtin_lisp_symbol (type->type);
|
||||
Lisp_Object tested = Fassq (typesym, Vlibrary_cache);
|
||||
/* If we failed to load the library before, don't try again. */
|
||||
if (CONSP (tested))
|
||||
return !NILP (XCDR (tested)) ? true : false;
|
||||
|
||||
bool (*init) (void) = type->init;
|
||||
if (init)
|
||||
{
|
||||
/* If we failed to load the library before, don't try again. */
|
||||
Lisp_Object typesym = builtin_lisp_symbol (type->type);
|
||||
Lisp_Object tested = Fassq (typesym, Vlibrary_cache);
|
||||
if (CONSP (tested) && NILP (XCDR (tested)))
|
||||
return false;
|
||||
bool type_valid = init ();
|
||||
Vlibrary_cache = Fcons (Fcons (typesym, type_valid ? Qt : Qnil),
|
||||
Vlibrary_cache);
|
||||
|
|
Loading…
Add table
Reference in a new issue