2
0
forked from Ivasoft/DSView

fix: sometimes,after decode task redo, annotation table visit error

This commit is contained in:
dreamsourcelabTAI
2022-04-07 16:29:31 +08:00
parent 0b06e22bf1
commit e41c3ae2fb
2 changed files with 4 additions and 1 deletions

View File

@@ -126,7 +126,9 @@ int AnnotationResTable::MakeIndex(const std::string &key, AnnotationSourceItem*
}
AnnotationSourceItem* AnnotationResTable::GetItem(int index){
assert(index >= 0 && index < m_resourceTable.size());
if (index < 0 || index >= (int)m_resourceTable.size()){
assert(false);
}
return m_resourceTable[index];
}

View File

@@ -1442,6 +1442,7 @@ void SigSession::rst_decoder(int index)
if (trace && trace->create_popup() ){
remove_decode_task(trace); //remove old task
trace->decoder()->clear();
add_decode_task(trace);
data_updated();
}