Code cleanup.

This commit is contained in:
spx
2011-10-30 01:39:19 +00:00
parent ccd6061427
commit 635eafcc94
2 changed files with 17 additions and 22 deletions

View File

@ -108,6 +108,11 @@ LPCTSTR ReadConfigString(LPCTSTR section, LPCTSTR key, LPCTSTR defValue)
CConfigParser* parser = Rainmeter->GetCurrentParser();
if (parser)
{
// NULL checking
if (section == NULL) section = L"";
if (key == NULL) key = L"";
if (defValue == NULL) defValue = L"";
return parser->ReadString(section, key, defValue, false).c_str();
}
}