diff options
Diffstat (limited to 'kcontrol/randr')
-rw-r--r-- | kcontrol/randr/krandrtray.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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) |