dix: protect doPolyText() from potential NULL dereference

There's a (theoretical) chance that origGC might be NULL, so better
be cautious and check for this - doesn't cost us much, probably just
another JZ instruction.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-06 13:02:17 +02:00
parent 634700301c
commit faae695d0a

View File

@ -1317,7 +1317,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
if (client_state == START_SLEEP) { if (client_state == START_SLEEP) {
/* Step 4 */ /* Step 4 */
if (pFont != origGC->font) { if (origGC && (pFont != origGC->font)) {
ChangeGCVal val; ChangeGCVal val;
val.ptr = pFont; val.ptr = pFont;