summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-10-28 22:51:41 (GMT)
committerhobbs <hobbs>2003-10-28 22:51:41 (GMT)
commit95ad9d470e7117fe5c4171605c5948d721994110 (patch)
tree4bd268c562b11876160a960f089f0dda9559ec77
parent802fcdd315629f5da59f0716b0eb5065d372c040 (diff)
downloadtk-95ad9d470e7117fe5c4171605c5948d721994110.zip
tk-95ad9d470e7117fe5c4171605c5948d721994110.tar.gz
tk-95ad9d470e7117fe5c4171605c5948d721994110.tar.bz2
* unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL
family against bad X servers.
-rw-r--r--unix/tkUnixFont.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 581e727..bf1c8b0 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixFont.c,v 1.20 2003/07/19 01:44:57 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixFont.c,v 1.21 2003/10/28 22:51:41 hobbs Exp $
*/
#include "tkUnixInt.h"
@@ -2716,6 +2716,13 @@ GetFontAttributes(display, fontStructPtr, faPtr)
} else {
TkInitFontAttributes(&faPtr->fa);
TkInitXLFDAttributes(&faPtr->xa);
+ }
+ /*
+ * Do last ditch check for family. It seems that some X servers can
+ * fail on the X font calls above, slipping through earlier checks.
+ * X-Win32 5.4 is one of these.
+ */
+ if (faPtr->fa.family == NULL) {
faPtr->fa.family = Tk_GetUid("");
faPtr->xa.foundry = Tk_GetUid("");
faPtr->xa.charset = Tk_GetUid("");