mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-02-03 09:44:26 -05:00
Fix memory leak of the previous commit
This commit is contained in:
parent
3e4aadfaef
commit
cf06709cb4
@ -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"";
|
||||
}
|
||||
}
|
||||
|
@ -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"";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user