[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115517: Avoid crashing due to closing of font whose
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r115517: Avoid crashing due to closing of font whose driver pointer is NULL. |
Date: |
Sat, 14 Dec 2013 09:16:59 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115517
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-14 11:16:10 +0200
message:
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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/alloc.c alloc.c-20091113204419-o5vbwnq5f7feedwu-252
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-12-14 08:29:42 +0000
+++ b/src/ChangeLog 2013-12-14 09:16:10 +0000
@@ -1,5 +1,8 @@
2013-12-14 Eli Zaretskii <address@hidden>
+ * 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.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2013-12-13 15:55:23 +0000
+++ b/src/alloc.c 2013-12-14 09:16:10 +0000
@@ -2877,7 +2877,12 @@
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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115517: Avoid crashing due to closing of font whose driver pointer is NULL.,
Eli Zaretskii <=