From 6e662473126d0668493732ece7e3c3bb1b0ea72c Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 13 Feb 2015 13:41:31 +0100 Subject: Several fixes for building debug versions of NX (990_fix-DEBUG-and-TEST-builds.full.patch). (1) In nx-X11/programs/Xserver/dix: Fix several compile errors when specifying -DDEBUG globally. Previous GCC versions were more liberal and the code thus compiled. Also initialize/reset a count variable correctly. (2) In nx-X11/programs/Xserver/hw/nxagent/Render.c: 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. --- nx-X11/programs/Xserver/hw/nxagent/Render.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Render.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 41a1ec02e..c5fd06352 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", -- cgit v1.2.3