From 46f718f6472f87fa26633346a4b343a51b0c7f7a Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 20 Nov 2018 10:44:26 +0100 Subject: [PATCH] Check correct return code --- unix/xserver/hw/vnc/vncSelection.c | 2 +- unix/xserver/hw/vnc/xvnc.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/unix/xserver/hw/vnc/vncSelection.c b/unix/xserver/hw/vnc/vncSelection.c index 51dfd9c6..4f3538d4 100644 --- a/unix/xserver/hw/vnc/vncSelection.c +++ b/unix/xserver/hw/vnc/vncSelection.c @@ -105,7 +105,7 @@ void vncClientCutText(const char* str, int len) LOG_ERROR("Could not set PRIMARY selection"); } - vncOwnSelection(xaCLIPBOARD); + rc = vncOwnSelection(xaCLIPBOARD); if (rc != Success) LOG_ERROR("Could not set CLIPBOARD selection"); } diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index 3b4d2f31..c845ebc4 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -766,10 +766,13 @@ vfbUninstallColormap(ColormapPtr pmap) curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, RT_COLORMAP); #else - dixLookupResourceByType((void * *) &curpmap, pmap->pScreen->defColormap, - RT_COLORMAP, serverClient, DixUnknownAccess); + int rc = dixLookupResourceByType((void * *) &curpmap, pmap->pScreen->defColormap, + RT_COLORMAP, serverClient, DixUnknownAccess); + if (rc != Success) + ErrorF("Failed to uninstall color map\n"); + else #endif - (*pmap->pScreen->InstallColormap)(curpmap); + (*pmap->pScreen->InstallColormap)(curpmap); } } } -- 2.39.5