Fix display configuration module crash

This pertains to Bug 1334
pull/16/head
Timothy Pearson 12 years ago
parent 2f10690bf1
commit 1d811a999d

@ -75,8 +75,8 @@ TQString capitalizeString(TQString in) {
} }
TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) { TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) {
KSimpleConfig *t_config; KSimpleConfig *t_config = NULL;
KSimpleConfig *t_systemconfig; KSimpleConfig *t_systemconfig = NULL;
int t_numberOfProfiles; int t_numberOfProfiles;
TQStringList t_cfgProfiles; TQStringList t_cfgProfiles;
TQString retval; TQString retval;
@ -109,11 +109,15 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa
} }
if (profileName != "") { if (profileName != "") {
if (t_config) {
delete t_config; delete t_config;
} }
}
else { else {
if (t_systemconfig) {
delete t_systemconfig; delete t_systemconfig;
} }
}
return retval; return retval;
} }

Loading…
Cancel
Save