From 5efcb9fb4084eda4226e6a28747a0a7e130cfcc0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 1 Sep 2011 19:35:06 +0000 Subject: Fix display gamma setting crash in kdelibs git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1250815 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krandr/libkrandr.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'krandr') diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc index 90049c13e..956328872 100644 --- a/krandr/libkrandr.cc +++ b/krandr/libkrandr.cc @@ -841,6 +841,9 @@ void KRandrSimpleAPI::applySystemwideDisplayGamma(TQPtrList sc screendata = screenInfoArray.at(i); output_info = randr_screen_info->outputs[i]->info; CrtcInfo *current_crtc = randr_screen_info->outputs[i]->cur_crtc; + if (!current_crtc) { + continue; + } // vvvvvvvvv This chunk of code is borrowed from xrandr vvvvvvvvvv int size = XRRGetCrtcGammaSize(randr_display, current_crtc->id); if (!size) { -- cgit v1.2.1