Commit 95c21652 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Avoid crashing due to closing of font whose driver pointer is NULL.

 src/alloc.c (cleanup_vector): Don't call the font driver's 'close'
 method if the 'driver' pointer is NULL.
parent 0b32070b
2013-12-14 Eli Zaretskii <eliz@gnu.org>
* alloc.c (cleanup_vector): Don't call the font driver's 'close'
method if the 'driver' pointer is NULL.
* fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
Windows-specific code to w32.c. Change error message text to
match that of Posix platforms.
......
......@@ -2877,7 +2877,12 @@ cleanup_vector (struct Lisp_Vector *vector)
if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT)
&& ((vector->header.size & PSEUDOVECTOR_SIZE_MASK)
== FONT_OBJECT_MAX))
((struct font *) vector)->driver->close ((struct font *) vector);
{
struct font *fnt = (struct font *) vector;
if (fnt->driver)
fnt->driver->close ((struct font *) vector);
}
}
/* Reclaim space used by unmarked vectors. */
......
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