diff --git a/DSView/pv/data/decode/annotationrestable.cpp b/DSView/pv/data/decode/annotationrestable.cpp index 55eeb9c9..3f33f263 100644 --- a/DSView/pv/data/decode/annotationrestable.cpp +++ b/DSView/pv/data/decode/annotationrestable.cpp @@ -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]; } diff --git a/DSView/pv/sigsession.cpp b/DSView/pv/sigsession.cpp index 094c446b..2ea36451 100755 --- a/DSView/pv/sigsession.cpp +++ b/DSView/pv/sigsession.cpp @@ -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(); }