Skip to content

Commit 5c1deb5

Browse files
committed
Fix a crash when tostring report error
1 parent ff5b369 commit 5c1deb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

emmy_debugger/src/debugger/emmy_debugger.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ void Debugger::GetVariable(lua_State *L, Idx<Variable> variable, int index, int
408408
string = lua_tostring(L, -1);
409409
lua_pop(L, 1);
410410
}
411+
else {
412+
lua_settop(L, topIndex);
413+
}
411414
}
412415
if (string) {
413416
variable->value = string;

0 commit comments

Comments
 (0)