mirror of
https://github.com/SWG-Source/src.git
synced 2026-01-15 23:05:01 -05:00
Fixed issue where guarded targets in space would crash
This commit is contained in:
@@ -105,6 +105,7 @@ elseif (UNIX)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# O3 and Ofast include one or more flags that cause java to crash when using gcc6
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-signed-zeros -freciprocal-math -fno-unroll-loops -fno-tree-loop-optimize -fno-plt")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -Og")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
||||
|
||||
@@ -116,13 +116,11 @@ SpaceSquad::~SpaceSquad()
|
||||
}
|
||||
|
||||
// Tell all the squads guarding me that I am not longer guardable
|
||||
|
||||
SpaceSquadList::iterator iterGuardedByList = m_guardedByList->begin();
|
||||
|
||||
for (; iterGuardedByList != m_guardedByList->end(); ++iterGuardedByList)
|
||||
{
|
||||
(*iterGuardedByList)->removeGuardTarget();
|
||||
}
|
||||
for (SpaceSquadList::iterator it = m_guardedByList->begin(), next_it = it; it != m_guardedByList->end(); it = next_it)
|
||||
{
|
||||
++next_it;
|
||||
(*it)->removeGuardTarget();
|
||||
}
|
||||
|
||||
delete m_guardedByList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user