From 5067041f2a712674c256344a8017eb7f99f1d1a6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 27 Jan 2011 18:42:21 +0000 Subject: Fix a segmentation fault when disconnecting from a server. --- src/core/zone.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/zone.cc b/src/core/zone.cc index a38959f..c298f78 100644 --- a/src/core/zone.cc +++ b/src/core/zone.cc @@ -141,6 +141,8 @@ Zone::Zone(std::istream & is) : Label() // client side does not setup a bullet physics environment zone_bullet_cache = 0; zone_bullet_world = 0; + zone_bullet_raycaster = 0; + receive_server_update(is); } @@ -152,12 +154,13 @@ Zone::~Zone() zone_content.clear(); - if (zone_bullet_raycaster) - delete zone_bullet_raycaster; - if (zone_bullet_world) delete zone_bullet_world; + + if (zone_bullet_raycaster) + delete zone_bullet_raycaster; + if (zone_bullet_cache) delete zone_bullet_cache; } -- cgit v1.2.3