diff --git a/src/game_api/movable_behavior.cpp b/src/game_api/movable_behavior.cpp index 2b4796f4e..817ba3a63 100644 --- a/src/game_api/movable_behavior.cpp +++ b/src/game_api/movable_behavior.cpp @@ -118,7 +118,7 @@ uint8_t CustomMovableBehavior::get_next_state_id(Movable* movable) void CustomMovableBehavior::hook_movable(Movable* movable) { using_movables[movable] = - movable->set_on_dtor([=](Entity*) + movable->set_on_dtor([=, this](Entity*) { using_movables.erase(movable); }); }