From ecb421e652ebf019ad88777d112137883196b873 Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Fri, 11 Dec 2009 00:06:50 +0100 Subject: Fix bug in other modules with destroy modules --- src/modules/modPipe.c | 3 +++ src/modules/modTeleport.c | 4 ++++ src/modules/modWall.c | 1 + 3 files changed, 8 insertions(+) (limited to 'src/modules') diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c index d07ec37..45e2d3a 100644 --- a/src/modules/modPipe.c +++ b/src/modules/modPipe.c @@ -329,7 +329,10 @@ static void recvMsg(char *msg) static int destroy() { space_destroy_with_item(spacePipe, destroyPipe); + spacePipe = NULL; + list_destroy(listPipe); + listPipe = NULL; return 0; } diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c index dec87ac..e6c9deb 100644 --- a/src/modules/modTeleport.c +++ b/src/modules/modTeleport.c @@ -348,7 +348,11 @@ static void recvMsg(char *msg) static int destroy() { space_destroy_with_item(spaceTeleport, destroyTeleport); + spaceTeleport = NULL; + list_destroy(listTeleport); + listTeleport = NULL; + return 0; } diff --git a/src/modules/modWall.c b/src/modules/modWall.c index 0e4ff02..fecd80b 100644 --- a/src/modules/modWall.c +++ b/src/modules/modWall.c @@ -354,6 +354,7 @@ static int destroy() #endif list_destroy(listWall); + listWall = NULL; spaceWall = 0; spaceImgWall = 0; -- cgit v1.2.3