StackTracer: Stop when instruction is at nullptr

This commit is contained in:
apio 2022-10-15 17:31:57 +02:00
parent aca1367158
commit eca7227fda

View File

@ -21,7 +21,7 @@ typedef struct stackframe
void StackTracer::trace() void StackTracer::trace()
{ {
stackframe* frame = (stackframe*)m_base_pointer; stackframe* frame = (stackframe*)m_base_pointer;
while (frame) while (frame && frame->instruction)
{ {
char symbol_name[512]; char symbol_name[512];
get_symbol_name(frame->instruction, symbol_name, sizeof(symbol_name)); get_symbol_name(frame->instruction, symbol_name, sizeof(symbol_name));