]> source.dussan.org Git - tigervnc.git/commitdiff
Check correct return code
authorJan Grulich <jgrulich@redhat.com>
Tue, 20 Nov 2018 09:44:26 +0000 (10:44 +0100)
committerJan Grulich <jgrulich@redhat.com>
Tue, 20 Nov 2018 09:44:26 +0000 (10:44 +0100)
unix/xserver/hw/vnc/vncSelection.c
unix/xserver/hw/vnc/xvnc.c

index 51dfd9c6370456996b6ccf22f3608bda1831046e..4f3538d4d9e0dd75fab2721e2a520f765518d3ba 100644 (file)
@@ -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");
 }
index 3b4d2f3182aaf22bf57d8f0208f603e29886423d..c845ebc45c9a747490b56c2bc4200f3a97a528f7 100644 (file)
@@ -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);
        }
     }
 }