Fix memory leak of the previous commit

This commit is contained in:
vsonnier 2018-06-07 21:44:17 +02:00
parent 3e4aadfaef
commit cf06709cb4
2 changed files with 4 additions and 0 deletions

View File

@ -584,6 +584,7 @@ std::wstring BookmarkMgr::getSafeWstringValue(DataNode* node, const std::string&
} catch (DataTypeMismatchException* e) {
//2) wstring decode fail, try simple std::string
delete e;
std::string decodedStdString;
try {
@ -594,6 +595,7 @@ std::wstring BookmarkMgr::getSafeWstringValue(DataNode* node, const std::string&
} catch (DataTypeMismatchException* e) {
//nothing works, return an empty string.
delete e;
decodedWString = L"";
}
}

View File

@ -445,6 +445,7 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
} catch (DataTypeMismatchException* e) {
//2) wstring decode fail, try simple std::string
delete e;
std::string decodedStdString;
try {
@ -454,6 +455,7 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
decodedWString = wxString(decodedStdString).ToStdWstring();
} catch (DataTypeMismatchException* e) {
delete e;
//nothing works, return an empty string.
decodedWString = L"";
}