]> source.dussan.org Git - tigervnc.git/commitdiff
Fix improper check of errors when getting a suitable RandR mode.
authorPierre Ossman <ossman@cendio.se>
Wed, 18 Jul 2012 14:29:54 +0000 (14:29 +0000)
committerPierre Ossman <ossman@cendio.se>
Wed, 18 Jul 2012 14:29:54 +0000 (14:29 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4940 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/xserver/hw/vnc/XserverDesktop.cc

index 99fca44d1fcdda683242d835ce78e0160db4621d..7e068b17b45d87510105b98fe180483d2b00d15b 100644 (file)
@@ -946,7 +946,7 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
     else {
       mode = findRandRMode(output, iter->dimensions.width(),
                            iter->dimensions.height());
-      if (!ret) {
+      if (mode == NULL) {
         vlog.error("Failed to find a suitable mode for %dx%d for output '%s'",
                    iter->dimensions.width(), iter->dimensions.height(),
                    output->name);
@@ -1027,7 +1027,7 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
 
     mode = findRandRMode(output, iter->dimensions.width(),
                          iter->dimensions.height());
-    if (!ret) {
+    if (mode == NULL) {
       vlog.error("Failed to find a suitable mode for %dx%d for output '%s'",
                  iter->dimensions.width(), iter->dimensions.height(),
                  output->name);