From 1d811a999daaad4b36130e54f908cb030b598d6b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 22 Nov 2012 22:53:55 -0600 Subject: [PATCH] Fix display configuration module crash This pertains to Bug 1334 --- krandr/libkrandr.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc index 633411041..f9f60471e 100644 --- a/krandr/libkrandr.cc +++ b/krandr/libkrandr.cc @@ -75,8 +75,8 @@ TQString capitalizeString(TQString in) { } TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) { - KSimpleConfig *t_config; - KSimpleConfig *t_systemconfig; + KSimpleConfig *t_config = NULL; + KSimpleConfig *t_systemconfig = NULL; int t_numberOfProfiles; TQStringList t_cfgProfiles; TQString retval; @@ -109,10 +109,14 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa } if (profileName != "") { - delete t_config; + if (t_config) { + delete t_config; + } } else { - delete t_systemconfig; + if (t_systemconfig) { + delete t_systemconfig; + } } return retval;