Add nullptr check in instructionmodel
MODIFY
external/VSRTL
external/VSRTL
-Subproject commit bd9e778a114fdcdb60442bfa2c98cd888e0d36ea
+Subproject commit d8c27900ed5bb8ce30d4bcb47dc5c3e2aa5a68bb

MODIFY
src/instructionmodel.h
src/instructionmodel.h
@@ -21,7 +21,7 @@ static inline uint32_t indexToAddress(const QModelIndex& index) {
}
static inline int addressToIndex(uint32_t addr) {
- if (ProcessorHandler::get()->getProgram()) {
+ if (ProcessorHandler::get()->getProgram() && ProcessorHandler::get()->getProgram()->getSection(TEXT_SECTION_NAME) != nullptr) {
return (addr - ProcessorHandler::get()->getProgram()->getSection(TEXT_SECTION_NAME)->address) / 4;
}
return 0;

Add nullptr check in instructionmodel