From f8aacb38253aaf11d3360f5536057409993789c5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 6 Jun 2022 20:56:50 +0200 Subject: [PATCH] - fixed crash in Last Warrior map 9. Really, asserts should not be used to test for errors that can actually happen! --- source/games/sw/src/weapon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 92b9a9fdc..e7e720005 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -16999,7 +16999,7 @@ bool SpriteWarpToSurface(DSWActor* actor) } } - ASSERT(Found); + if (!Found) return false; if (underActor->spr.lotag == 0) return false; @@ -17019,7 +17019,7 @@ bool SpriteWarpToSurface(DSWActor* actor) } } - ASSERT(Found); + if (!Found) return false; // get the offset from the under sprite sx = underActor->spr.pos.X - actor->spr.pos.X;