diff options
author | hobbs <hobbs> | 2003-10-29 01:07:46 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-10-29 01:07:46 (GMT) |
commit | 0a33d1a5e30a44e9689fbcddcf9438a8f2cd4282 (patch) | |
tree | b2de2d8b9a8163ffe93cd5f46ea4345923449311 /unix | |
parent | 298bf949d9b3d9909ca44a3785afb833bc73c6a9 (diff) | |
download | tk-0a33d1a5e30a44e9689fbcddcf9438a8f2cd4282.zip tk-0a33d1a5e30a44e9689fbcddcf9438a8f2cd4282.tar.gz tk-0a33d1a5e30a44e9689fbcddcf9438a8f2cd4282.tar.bz2 |
* unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL
family against bad X servers.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixFont.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index d29fd9f..22ea02f 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.18.2.2 2003/07/19 01:45:42 hobbs Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.3 2003/10/29 01:07:46 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(""); |