diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-09-28 22:54:05 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-09-28 22:54:05 -0400 |
| commit | 515381255191f35845e8c57059842741fcc652cd (patch) | |
| tree | e62b554e4f25f9da7d3388941a9aeffd22b6d290 /settings.cpp | |
| parent | 328281d02cc9ed281b47915c4b02e36328ad2bb5 (diff) | |
Namespace API cleanup
Diffstat (limited to 'settings.cpp')
| -rw-r--r-- | settings.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/settings.cpp b/settings.cpp index b5899e38..ca1e42a3 100644 --- a/settings.cpp +++ b/settings.cpp @@ -17,7 +17,10 @@ int64_t Setting::GetInteger(const std::string& pluginName, const std::string& na std::string Setting::GetString(const std::string& pluginName, const std::string& name, const std::string& defaultValue) { - return BNSettingGetString(pluginName.c_str(), name.c_str(), defaultValue.c_str()); + char* str = BNSettingGetString(pluginName.c_str(), name.c_str(), defaultValue.c_str()); + string result(str); + BNFreeString(str); + return result; } double Setting::GetDouble(const std::string& pluginName, const std::string& name, double defaultValue) |
