dix: NULL-protect AllocGlyphCursor()
Return error to the client if sourcefont turns out to be NULL for whatever reason. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
af71108cd3
commit
77502c6836
|
@ -339,7 +339,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
|
||||
rc = dixLookupResourceByType((void **) &sourcefont, source, X11_RESTYPE_FONT,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success) {
|
||||
if ((rc != Success) || (!sourcefont)) {
|
||||
client->errorValue = source;
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue