From 93f44e177373f8cf3b79efb940241c4dca2df50b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 18 Jul 2012 14:29:54 +0000 Subject: [PATCH] Fix improper check of errors when getting a suitable RandR mode. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4940 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/xserver/hw/vnc/XserverDesktop.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 99fca44d..7e068b17 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -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); -- 2.39.5