summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-12 06:43:05 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-12 06:43:05 +0000
commit03a7616c3868c87c6aa86aeaaeae63c946636334 (patch)
treeeb7b7d6f0c0f8f931e8f7be358f645d57b7eda64 /src/map/chat.c
parent96481b27189622e26e16dfc44b7f938dc1f84cd7 (diff)
downloadhercules-03a7616c3868c87c6aa86aeaaeae63c946636334.tar.gz
hercules-03a7616c3868c87c6aa86aeaaeae63c946636334.tar.bz2
hercules-03a7616c3868c87c6aa86aeaaeae63c946636334.tar.xz
hercules-03a7616c3868c87c6aa86aeaaeae63c946636334.zip
Replaced one incorrect nullpo check in chat_deletenpcchat()
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index 19f265b27..a466424d4 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -307,9 +307,11 @@ int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool p
int chat_deletenpcchat(struct npc_data* nd)
{
struct chat_data *cd;
-
nullpo_retr(0, nd);
- nullpo_retr(0, cd = (struct chat_data*)map_id2bl(nd->chat_id));
+
+ cd = (struct chat_data*)map_id2bl(nd->chat_id);
+ if( cd == NULL )
+ return 0;
chat_npckickall(cd);
clif_clearchat(cd, 0);