From b679c532c63f556cc0355fe7118d7470c488ceda Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Tue, 22 Dec 2009 00:33:13 +0100 Subject: fix bug with quit net mutiplayer (program crashed) and fix memory leak, program tested under valgrind --- src/screen/world.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/screen') diff --git a/src/screen/world.c b/src/screen/world.c index 022a30d..2b96919 100644 --- a/src/screen/world.c +++ b/src/screen/world.c @@ -440,10 +440,6 @@ void stoptWorld() hot_key_unregister(SDLK_ESCAPE); arena_quit(); - if (arena != NULL) { - arena_destroy(arena); - } - radar_quit(); pauza_quit(); term_quit(); @@ -467,9 +463,14 @@ void stoptWorld() #endif /* NO_SOUND */ module_quit(); chat_quit(); - id_quit_list(); net_multiplayer_quit(); + + if (arena != NULL) { + arena_destroy(arena); + } + + id_quit_list(); } void world_init() -- cgit v1.2.3