Skip to content

Commit

Permalink
Fix crash when NPC trying to open the door
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Dec 12, 2017
1 parent 06d3263 commit 5e5cf47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xrGame/doors_door.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void door::change_state(actor* initiator)
if (m_state == m_target_state)
return;

m_object.callback(GameObject::eUseObject)(m_object.lua_game_object(), (CScriptGameObject*)initiator->lua_game_object());
m_object.callback(GameObject::eUseObject)(m_object.lua_game_object(), initiator ? static_cast<CScriptGameObject*>(initiator->lua_game_object()) : nullptr);
#ifdef DEBUG
if (g_debug_doors)
Msg("door[%s] started to change its state to [%s]", m_object.cName().c_str(),
Expand Down

0 comments on commit 5e5cf47

Please sign in to comment.