From 0a9caa3b3716846c944b76795b182caa4050e63a Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 21 Apr 2010 19:01:33 +0000 Subject: Backport of SVN r1097263 to fix Solaris compilation with [CVE-2010-0436] git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1117290 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/randr/krandrtray.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kcontrol/randr/krandrtray.cpp') diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp index 3c1317e92..508c4a6ae 100644 --- a/kcontrol/randr/krandrtray.cpp +++ b/kcontrol/randr/krandrtray.cpp @@ -74,8 +74,10 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name) randr_display = XOpenDisplay(NULL); - last_known_x = currentScreen()->currentPixelWidth(); - last_known_y = currentScreen()->currentPixelHeight(); + if (isValid() == true) { + last_known_x = currentScreen()->currentPixelWidth(); + last_known_y = currentScreen()->currentPixelHeight(); + } } void KRandRSystemTray::mousePressEvent(QMouseEvent* e) -- cgit v1.2.1