From 21c398f67150e64021432353332be5bd2c124c45 Mon Sep 17 00:00:00 2001 From: absol89 Date: Mon, 19 Oct 2026 22:03:32 +0200 Subject: [PATCH] Fix crash when a launched projectile can't be found HookLaunch asserted that the engine's launch returned a resolvable projectile and then read its power anyway. When the handle didn't resolve, the game crashed on a null pointer, or froze on the assert's breakpoint with a debugger attached. Such launches are now left unsynced with a warning. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 22f2f224aca39519b5eb72ecf418386564dde489) --- .../client/Games/Skyrim/Projectiles/Projectile.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Code/client/Games/Skyrim/Projectiles/Projectile.cpp b/Code/client/Games/Skyrim/Projectiles/Projectile.cpp index 201b640f48..dec4f4357c 100644 --- a/Code/client/Games/Skyrim/Projectiles/Projectile.cpp +++ b/Code/client/Games/Skyrim/Projectiles/Projectile.cpp @@ -97,12 +97,20 @@ BSPointerHandle* TP_MAKE_THISCALL(HookLaunch, BSPointerHandlehandle.iBits); Projectile* pProjectile = Cast(pObject); - - TP_ASSERT(pProjectile, "No projectile found."); + if (!pProjectile) + { + spdlog::warn("No projectile found for handle {:X}, not syncing the launch", result->handle.iBits); + return result; + } Event.Power = pProjectile->fPower;