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
+2
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"";
}