From 26c9fc3eaf6eb82e6aa166d480d95db1f659b9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Tue, 25 Mar 2025 09:16:17 +0100 Subject: [PATCH] don't crash when calling OverrideWehicleWheelTransforms with invalid physics scene --- WickedEngine/wiPhysics_Jolt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WickedEngine/wiPhysics_Jolt.cpp b/WickedEngine/wiPhysics_Jolt.cpp index 60c5582a7..01f55b1c9 100644 --- a/WickedEngine/wiPhysics_Jolt.cpp +++ b/WickedEngine/wiPhysics_Jolt.cpp @@ -2586,6 +2586,8 @@ namespace wi::physics void OverrideWehicleWheelTransforms(wi::scene::Scene& scene) { + if (scene.physics_scene == nullptr) + return; if (!IsSimulationEnabled()) return; PhysicsScene& physics_scene = GetPhysicsScene(scene);