summaryrefslogtreecommitdiffstats
path: root/krandr
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-22 22:53:55 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-22 22:53:55 -0600
commit1d811a999daaad4b36130e54f908cb030b598d6b (patch)
treebcc89f6eb3af6eab7d864312252ce2da10e2cdf6 /krandr
parent2f10690bf1b6edb4aed9d839ba8ef779ec90f761 (diff)
downloadtdelibs-1d811a999daaad4b36130e54f908cb030b598d6b.tar.gz
tdelibs-1d811a999daaad4b36130e54f908cb030b598d6b.zip
Fix display configuration module crash
This pertains to Bug 1334
Diffstat (limited to 'krandr')
-rw-r--r--krandr/libkrandr.cc12
1 files 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;