[X2Go-Dev] Bug#516: Bug#516: [PATCH 4/5] Fix issues in TEST mode in NX modules.

Mihai Moldovan ionic at ionic.de
Sat Jun 21 05:26:28 CEST 2014


Check for pSrc->pDrawable to exist instead of having nxagent segfault when it
does not.

This enables the possibility of compiling all nxagent modules in TEST mode.
-------------- next part --------------
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 41a1ec0..9f8c994 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -1678,10 +1678,11 @@ FIXME: Is this useful or just a waste of bandwidth?
 
   #ifdef TEST
 
-  fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n",
-              (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"),
-                  pSrc -> pDrawable -> width, pSrc -> pDrawable -> height);
-
+  if (pSrc->pDrawable) {
+    fprintf(stderr, "nxagentTrapezoids: Source is a [%s] of geometry [%d,%d].\n",
+                (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"),
+                    pSrc -> pDrawable -> width, pSrc -> pDrawable -> height);
+  }
   if (pSrc ->pDrawable != pDst -> pDrawable)
   {
     fprintf(stderr, "nxagentTrapezoids: Destination is a [%s] of geometry [%d,%d].\n",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4265 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20140621/95698a39/attachment-0001.bin>


More information about the x2go-dev mailing list