summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/modWall.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/modules/modWall.c b/modules/modWall.c
index 056bb5c..d917309 100755
--- a/modules/modWall.c
+++ b/modules/modWall.c
@@ -322,10 +322,22 @@ void cmd(char *line)
int destroy()
{
- destroySpaceWithObject(spaceWall, destroyWall);
+ if( spaceWall != NULL )
+ {
+ destroySpaceWithObject(spaceWall, destroyWall);
+ }
+
#ifndef PUBLIC_SERVER
- destroySpace(spaceImgWall);
+ if( spaceImgWall != NULL )
+ {
+ destroySpace(spaceImgWall);
+ }
#endif
- destroyList(listWall);
+
+ if( listWall != NULL )
+ {
+ destroyList(listWall);
+ }
+
return 0;
}