patch for python/Extensions/X11/Fontobject.c

Guido.van.Rossum@cwi.nl
Tue, 26 Apr 1994 13:34:31 +0200

Sjoerd Mullender sent me the following fix for the X11 Extensions.

*** ../../.ROSRC/Extensions/X11/Fontobject.c Fri Feb 4 14:17:17 1994
--- Fontobject.c Tue Apr 26 12:33:25 1994
***************
*** 51,56 ****
--- 51,61 ----
return NULL;
f->f_display = display;
f->f_struct = XLoadQueryFont(display, name);
+ if (f->f_struct == NULL) {
+ DEL(f);
+ err_setstr(RuntimeError, "no such font");
+ return NULL;
+ }
return (object *)f;
}

PS This is unrelated to Dan Connolly's problem -- his fix (commenting
out "pntsize = size" appears to be correct. I'll look into the
GetValues warnings later.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>