diff options
-rw-r--r-- | plugins/CurrencyRates/src/DBUtils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/CurrencyRates/src/DBUtils.cpp b/plugins/CurrencyRates/src/DBUtils.cpp index cdc6560db7..0645387d9e 100644 --- a/plugins/CurrencyRates/src/DBUtils.cpp +++ b/plugins/CurrencyRates/src/DBUtils.cpp @@ -2,11 +2,17 @@ std::string CurrencyRates_DBGetStringA(MCONTACT hContact, const char* szModule, const char* szSetting, const char* pszDefValue) { + if (pszDefValue == nullptr) + pszDefValue = ""; + return std::string(ptrA(db_get_sa(hContact, szModule, szSetting, pszDefValue))); } std::wstring CurrencyRates_DBGetStringW(MCONTACT hContact, const char* szModule, const char* szSetting, const wchar_t* pszDefValue) { + if (pszDefValue == nullptr) + pszDefValue = L""; + return std::wstring(ptrW(db_get_wsa(hContact, szModule, szSetting, pszDefValue))); } |