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:
parent
634700301c
commit
faae695d0a
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue