summaryrefslogtreecommitdiff
path: root/plugins/Watrack_MPD/src/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack_MPD/src/utilities.cpp')
-rwxr-xr-xplugins/Watrack_MPD/src/utilities.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Watrack_MPD/src/utilities.cpp b/plugins/Watrack_MPD/src/utilities.cpp
index fc5e621837..05c5d2f1b4 100755
--- a/plugins/Watrack_MPD/src/utilities.cpp
+++ b/plugins/Watrack_MPD/src/utilities.cpp
@@ -20,11 +20,13 @@
TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef)
{
DBVARIANT dbv = {DBVT_DELETED};
- TCHAR* szRes;
+ TCHAR* szRes = NULL;
if (db_get_ts(hContact, szModule, szSetting, &dbv))
return _tcsdup(szDef);
- if(dbv.pszVal)
+ else if(dbv.pszVal)
szRes = _tcsdup(dbv.ptszVal);
+ else
+ szRes = _tcsdup(szDef);
db_free(&dbv);
return szRes;
}