Fixed ASAN error in debug symbol delete.
This commit is contained in:
parent
575b019659
commit
b3386027bd
|
@ -77,17 +77,19 @@ int debugSymbolPage_t::deleteSymbolAtOffset( int ofs )
|
|||
|
||||
if ( it != symMap.end() )
|
||||
{
|
||||
if ( it->second->name().size() > 0 )
|
||||
auto sym = it->second;
|
||||
|
||||
if ( sym->name().size() > 0 )
|
||||
{
|
||||
auto itName = symNameMap.find( it->second->name() );
|
||||
auto itName = symNameMap.find( sym->name() );
|
||||
|
||||
if ( itName != symNameMap.end() )
|
||||
{
|
||||
symNameMap.erase(itName);
|
||||
}
|
||||
}
|
||||
delete it->second;
|
||||
symMap.erase(it);
|
||||
delete sym;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -867,8 +867,8 @@ int SymbolEditWindow::exec(void)
|
|||
{
|
||||
sym->updateName( nameEntry->text().toStdString().c_str() );
|
||||
sym->commentAssign( commentEntry->toPlainText().toStdString().c_str() );
|
||||
sym->trimTrailingSpaces();
|
||||
}
|
||||
sym->trimTrailingSpaces();
|
||||
}
|
||||
debugSymbolTable.save(); // Save table to disk immediately after an add, edit, or delete
|
||||
FCEU_WRAPPER_UNLOCK();
|
||||
|
|
Loading…
Reference in New Issue