diff options
author | Pierre Ossman <ossman@cendio.se> | 2009-03-23 16:28:53 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2009-03-23 16:28:53 +0000 |
commit | d108fb872ef6617deeceb6747719704ead437538 (patch) | |
tree | 7bc735a1be1fd730adfdd173370ec9cdb378c392 /unix | |
parent | 34bb06193e20940e269bff1740939d6ed286856c (diff) | |
download | tigervnc-d108fb872ef6617deeceb6747719704ead437538.tar.gz tigervnc-d108fb872ef6617deeceb6747719704ead437538.zip |
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
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index 514ebf7d..ed09b802 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -802,7 +802,7 @@ static miPointerScreenFuncRec vfbPointerCursorFuncs = { 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 @@ static Bool vncRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) 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); |