From b03909fd4ccfb618957e16cce93e7634dbe46386 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 17 Jan 2013 14:54:41 -0600 Subject: Fix krandr crash under certain circumstances --- krandr/randr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/krandr/randr.cpp b/krandr/randr.cpp index 0300801ca..f1b1aae21 100644 --- a/krandr/randr.cpp +++ b/krandr/randr.cpp @@ -829,7 +829,13 @@ KDE_EXPORT void RandRDisplay::applyProposed(bool confirm) KDE_EXPORT bool RandRDisplay::showTestConfigurationDialog() { - return screen(0)->showTestConfigurationDialog(); + RandRScreen* firstScreen = screen(0); + if (firstScreen) { + return firstScreen->showTestConfigurationDialog(); + } + else { + return false; + } } KDE_EXPORT bool RandRScreen::showTestConfigurationDialog() -- cgit v1.2.1