summaryrefslogtreecommitdiff
path: root/src/screen_world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen_world.c')
-rw-r--r--src/screen_world.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/screen_world.c b/src/screen_world.c
index 7e63cd0..45daee5 100644
--- a/src/screen_world.c
+++ b/src/screen_world.c
@@ -363,6 +363,8 @@ void eventWorld()
if( arena == NULL )
{
eventNetMultiplayer();
+ eventEnd();
+ eventEsc();
return;
}
@@ -381,8 +383,8 @@ void eventWorld()
eventTimer();
eventNetMultiplayer();
- eventEsc();
eventEnd();
+ eventEsc();
}
void startWorld()
@@ -439,12 +441,21 @@ static void setTable()
void stoptWorld()
{
- setTable();
- setAnalyze();
- delAllImageInGroup(IMAGE_GROUP_USER);
+ if( arena != NULL )
+ {
+ setTable();
+ setAnalyze();
+ }
+
quitNetMultiplayer();
- destroyArena(arena);
+
+ if( arena != NULL )
+ {
+ destroyArena(arena);
+ }
+
stopMusic();
+ delAllImageInGroup(IMAGE_GROUP_USER);
delAllMusicInGroup(MUSIC_GROUP_USER);
quitTimer();
}