summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-07-18 14:29:54 +0000
committerPierre Ossman <ossman@cendio.se>2012-07-18 14:29:54 +0000
commit93f44e177373f8cf3b79efb940241c4dca2df50b (patch)
tree6e75dd7b908ed7ce0557199a63cf7d9e94aea3f7 /unix
parentf84403833857fe4acc027eb29c128feda6c3dc96 (diff)
downloadtigervnc-93f44e177373f8cf3b79efb940241c4dca2df50b.tar.gz
tigervnc-93f44e177373f8cf3b79efb940241c4dca2df50b.zip
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
Diffstat (limited to 'unix')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc4
1 files 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);