changeset: 4506:dbf79a1732bafb35ad5b7e86e8e535e95ec074ca
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jul 10 17:05:59 2008 +0200
files: src/ChangeLog src/redisplay-msw.c
description:
Don't try to get text width for the null font instance, mswindows
2008-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay-msw.c (mswindows_text_width_single_run):
Explicitly check for the null font instance, and return zero if
so. Avoids the crash documented in
http://mid.gmane.org/18473.32468.712317.149457@parhasard.net .
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r
dbf79a1732bafb35ad5b7e86e8e535e95ec074ca src/ChangeLog
--- a/src/ChangeLog Sun Jul 06 19:46:19 2008 +0300
+++ b/src/ChangeLog Thu Jul 10 17:05:59 2008 +0200
@@ -1,3 +1,10 @@ 2008-05-27 Aidan Kehoe <kehoea@parhasa
+2008-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * redisplay-msw.c (mswindows_text_width_single_run):
+ Explicitly check for the null font instance, and return zero if
+ so. Avoids the crash documented in
+
http://mid.gmane.org/18473.32468.712317.149457@parhasard.net .
+
2008-05-27 Aidan Kehoe <kehoea(a)parhasard.net>
* editfns.c (Ftranslate_region):
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r
dbf79a1732bafb35ad5b7e86e8e535e95ec074ca src/redisplay-msw.c
--- a/src/redisplay-msw.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/redisplay-msw.c Thu Jul 10 17:05:59 2008 +0200
@@ -147,6 +147,15 @@ mswindows_text_width_single_run (HDC hdc
{
Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
SIZE size;
+
+ /* The X11 code doesn't have to do this explicitly, because there we trust
+ the font instance to know whether it's actually proportional or not,
+ and we use the zero width that is stored in the monospace null font
+ instance. */
+ if (EQ (Vthe_null_font_instance, font_inst))
+ {
+ return 0;
+ }
#if 0 /* #### not the way of ikeyama's ws */
if (!fi->proportional_p || !hdc)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches