diff --git a/src/App/Callback/Controllers/VehicleLightControlHook.hpp b/src/App/Callback/Controllers/VehicleLightControlHook.hpp index b1a82437..2da5440f 100644 --- a/src/App/Callback/Controllers/VehicleLightControlHook.hpp +++ b/src/App/Callback/Controllers/VehicleLightControlHook.hpp @@ -33,7 +33,11 @@ class VehicleLightControlHook inline static void OnToggleLights(Red::vehicleController* aController, bool aEnable, Red::vehicleELightType aLightType) { - CallbackSystem::Get()->DispatchNativeEvent(EventName, Red::AsWeakHandle(aController->owner), aEnable, aLightType); + auto vehicleEntity = Red::AsWeakHandle(aController->owner); + if (vehicleEntity) + { + CallbackSystem::Get()->DispatchNativeEvent(EventName, vehicleEntity, aEnable, aLightType); + } } }; }