[PATCH] Rootless: src drawable window can now be NULL

Colin Harrison colin.harrison at virgin.net
Tue Oct 13 01:45:22 PDT 2009


Hi,

This is one for Jeremy Huddleston and Jon Turney.

Found when testing rootless modes in Xming using the new xeyes (uses Xrender
to anti-alias).

Patch to fix the crash and make it work...

--- ./xserver/miext/rootless/rootlessScreen.c   2009-08-23
10:10:35.000000000 +0100
+++ ./test/miext/rootless/rootlessScreen.c      2009-10-13
09:34:49.000000000 +0100
@@ -257,8 +257,9 @@ RootlessComposite(CARD8 op, PicturePtr p
         maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
                   (WindowPtr)pMask->pDrawable :  NULL;
     }
-    srcWin  = (pSrc->pDrawable->type  == DRAWABLE_WINDOW) ?
-              (WindowPtr)pSrc->pDrawable  :  NULL;
+    if (!pSrc->pDrawable) srcWin = NULL;
+    else srcWin  = (pSrc->pDrawable->type  == DRAWABLE_WINDOW) ?
+                   (WindowPtr)pSrc->pDrawable  :  NULL;
     dstWin  = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
               (WindowPtr)pDst->pDrawable  :  NULL;

Thanks,
Colin Harrison



More information about the xorg-devel mailing list