Skip to content

Commit

Permalink
fix crash with dmengine when sdk not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Oct 19, 2017
1 parent 6fd0127 commit 8cb3891
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions defunityads/src/DefUnityCallback.cpp
Expand Up @@ -17,9 +17,10 @@ struct CallbackData
dmArray<CallbackData> m_callbacksQueue;

void finalize(){
defUtoLua->listener.m_Callback = LUA_NOREF;
if(defUtoLua){
defUtoLua->listener.m_Callback = LUA_NOREF;
}
}

void set_callback(lua_State* L, int pos){
defUtoLua = &g_DefUAds;
luaL_checktype(L, pos, LUA_TFUNCTION);
Expand Down

0 comments on commit 8cb3891

Please sign in to comment.