Blob Blame History Raw
From 257aae50cffbcedf488245c289b30c334c2d5cc0 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sat, 20 Dec 2014 00:23:53 +0100
Subject: [PATCH 4/7] Fix crash in XRandr1.1 backend

REVIEW: 121605
BUGS: 341485
---
 backends/xrandr1.1/xrandr11.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backends/xrandr1.1/xrandr11.cpp b/backends/xrandr1.1/xrandr11.cpp
index 3136957..c0380a6 100644
--- a/backends/xrandr1.1/xrandr11.cpp
+++ b/backends/xrandr1.1/xrandr11.cpp
@@ -90,6 +90,10 @@ KScreen::Config* XRandR11::config() const
     ScreenInfo info(xcbScreen->root);
     ScreenSize size(xcbScreen->root);
 
+    if (info.isNull() || size.isNull()) {
+        return 0;
+    }
+
     if (info->config_timestamp == m_currentTimestamp) {
         return m_currentConfig;
     }
-- 
2.5.0