From fb2391d4cef33c87dd930b7b498241920ae907eb Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Fri, 1 Nov 2024 17:47:51 +1100 Subject: [PATCH] Oculus crash fix Master nullptr check --- src/strategy/dungeons/wotlk/oculus/OculusMultipliers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/strategy/dungeons/wotlk/oculus/OculusMultipliers.cpp b/src/strategy/dungeons/wotlk/oculus/OculusMultipliers.cpp index 13490f93..023d5256 100644 --- a/src/strategy/dungeons/wotlk/oculus/OculusMultipliers.cpp +++ b/src/strategy/dungeons/wotlk/oculus/OculusMultipliers.cpp @@ -15,6 +15,8 @@ float MountingDrakeMultiplier::GetValue(Action* action) // It seems like this is due to moving/other actions being processed during the 0.5 secs. // If we suppress everything, they seem to mount properly. A bit of a ham-fisted solution but it works Player* master = botAI->GetMaster(); + if (!master) { return 1.0f; } + if (bot->GetMapId() != OCULUS_MAP_ID || !master->GetVehicleBase() || bot->GetVehicleBase()) { return 1.0f; } if (!dynamic_cast(action))