From 5e217b8c06e779baa066e56baf47247e5eb86c28 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:24:44 +0000 Subject: [PATCH] bugfix(core): Improve list safety and cleanup logic --- .../Source/W3DDevice/GameClient/CameraShakeSystem.cpp | 1 - Core/Libraries/Source/WWVegas/WWLib/multilist.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/CameraShakeSystem.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/CameraShakeSystem.cpp index 4d17d6eb417..90fc3d6d9b0 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/CameraShakeSystem.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/CameraShakeSystem.cpp @@ -192,7 +192,6 @@ CameraShakeSystemClass::~CameraShakeSystemClass() */ while (!CameraShakerList.Is_Empty()) { CameraShakerClass * obj = CameraShakerList.Remove_Head(); - CameraShakerList.Remove(obj); delete obj; } } diff --git a/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp b/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp index 771623cbf5f..1044a63e806 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp @@ -164,7 +164,7 @@ bool GenericMultiListClass::Internal_Add_After(MultiListObjectClass * obj,const // find the node hanging off 'existing_list_member' that corresponds to this list (O(numlists)) MultiListNodeClass * existing_node = existing_list_member->Get_List_Node(); - while ((existing_node->List != this) && (existing_node)) { + while ((existing_node) && (existing_node->List != this)) { existing_node = existing_node->NextList; }