RRRegisterRate() can in theory fail. Make sure we catch this.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3709 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
index 514ebf7..ed09b80 100644
--- a/unix/xserver/hw/vnc/xvnc.cc
+++ b/unix/xserver/hw/vnc/xvnc.cc
@@ -802,7 +802,7 @@
 static Bool vncRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
 {
   vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
-  Bool gotCurrent = FALSE;
+  Bool ret, gotCurrent = FALSE;
   int i;
 
   const int widths[] =  { 1920, 1920, 1600, 1680, 1400, 1360, 1280, 1280, 1280, 1280, 1024, 800, 640 };
@@ -816,7 +816,9 @@
     if (!pSize)
       return FALSE;
 
-    RRRegisterRate(pScreen, pSize, 60);
+    ret = RRRegisterRate(pScreen, pSize, 60);
+    if (!ret)
+      return FALSE;
 
     if ((widths[i] == pScreen->width) && (heights[i] == pScreen->height)) {
       RRSetCurrentConfig(pScreen, RR_Rotate_0, 60, pSize);