fix segfault when pressing f or t in graph mode without a defined func

This commit is contained in:
Vasco-jofra 2018-09-07 23:32:30 +01:00 committed by Florian Märkl
parent 9501ecf38c
commit f7d1ce8771

View File

@ -653,6 +653,10 @@ void DisassemblerGraphView::zoomReset()
void DisassemblerGraphView::takeTrue()
{
DisassemblyBlock *db = blockForAddress(seekable->getOffset());
if (!db) {
return;
}
if (db->true_path != RVA_INVALID) {
seekable->seek(db->true_path);
} else if (blocks[db->entry].exits.size()) {
@ -663,6 +667,10 @@ void DisassemblerGraphView::takeTrue()
void DisassemblerGraphView::takeFalse()
{
DisassemblyBlock *db = blockForAddress(seekable->getOffset());
if (!db) {
return;
}
if (db->false_path != RVA_INVALID) {
seekable->seek(db->false_path);
} else if (blocks[db->entry].exits.size()) {