Skip to content

Commit e68941a

Browse files
authored
Fixed a crash when we have an error in the callback
1 parent 47694d5 commit e68941a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

facebook/src/facebook_util.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,8 @@ void dmFacebook::RunCallback(lua_State* L, int* _self, int* _callback, const cha
639639

640640
if (lua_pcall(L, 2, 0, 0) != 0)
641641
{
642-
dmLogError("Error running facebook callback");
642+
dmLogError("Error running facebook callback: %s", lua_tostring(L, -1));
643+
lua_pop(L, 1);
643644
}
644645

645646
dmScript::Unref(L, LUA_REGISTRYINDEX, *_callback);

0 commit comments

Comments
 (0)