diff --git a/src/apps/debugger/model/Team.cpp b/src/apps/debugger/model/Team.cpp index 20889a8dc0..55537e52c8 100644 --- a/src/apps/debugger/model/Team.cpp +++ b/src/apps/debugger/model/Team.cpp @@ -242,12 +242,13 @@ printf(" -> no function instance\n"); // statement directly. if (DisassembledCode* code = functionInstance->GetSourceCode()) { Statement* statement = code->StatementAtAddress(address); - if (statement != NULL) { - statement->AcquireReference(); - _statement = statement; - _function = functionInstance; - return B_OK; - } + if (statement == NULL) + return B_ENTRY_NOT_FOUND; + + statement->AcquireReference(); + _statement = statement; + _function = functionInstance; + return B_OK; } // get the statement from the image debug info