about summary refs log tree commit diff
path: root/src/game/server/entities/flag.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-16 03:29:08 +0100
committeroy <Tom_Adams@web.de>2010-12-16 03:29:08 +0100
commit0121f273112624d531d57fb37cb1bdf9e7c537df (patch)
treeed517e71def6310b13e2ab491ce1b6bee4ac904d /src/game/server/entities/flag.cpp
parent54f138f89445def6060209d21f153b1e5378d58d (diff)
downloadzcatch-0121f273112624d531d57fb37cb1bdf9e7c537df.tar.gz
zcatch-0121f273112624d531d57fb37cb1bdf9e7c537df.zip
fixed server crash on too many snap items. Closes #317
Diffstat (limited to 'src/game/server/entities/flag.cpp')
-rw-r--r--src/game/server/entities/flag.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/server/entities/flag.cpp b/src/game/server/entities/flag.cpp
index e155f848..4d034214 100644
--- a/src/game/server/entities/flag.cpp
+++ b/src/game/server/entities/flag.cpp
@@ -26,6 +26,9 @@ void CFlag::Reset()
 void CFlag::Snap(int SnappingClient)
 {
 	CNetObj_Flag *pFlag = (CNetObj_Flag *)Server()->SnapNewItem(NETOBJTYPE_FLAG, m_Team, sizeof(CNetObj_Flag));
+	if(!pFlag)
+		return;
+
 	pFlag->m_X = (int)m_Pos.x;
 	pFlag->m_Y = (int)m_Pos.y;
 	pFlag->m_Team = m_Team;