From 0121f273112624d531d57fb37cb1bdf9e7c537df Mon Sep 17 00:00:00 2001 From: oy Date: Thu, 16 Dec 2010 03:29:08 +0100 Subject: fixed server crash on too many snap items. Closes #317 --- src/game/server/entities/laser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/game/server/entities/laser.cpp') diff --git a/src/game/server/entities/laser.cpp b/src/game/server/entities/laser.cpp index 1c598e6b..17eb4332 100644 --- a/src/game/server/entities/laser.cpp +++ b/src/game/server/entities/laser.cpp @@ -98,6 +98,9 @@ void CLaser::Snap(int SnappingClient) return; CNetObj_Laser *pObj = static_cast(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser))); + if(!pObj) + return; + pObj->m_X = (int)m_Pos.x; pObj->m_Y = (int)m_Pos.y; pObj->m_FromX = (int)m_From.x; -- cgit 1.4.1