summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/clif.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index c5786f39f..2d72fc81b 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,7 @@
Date Added
12/4
+ * Fixed a crash in clif_send when player disconnects but player
+ object is not fully removed from map [MouseJstr]
* Fixed a crash associated with NPC_BARRIER [MouseJstr]
* Renamed flush_fifos_at_exit to flush_fifos [MouseJstr]
* call check_connect_char_server() on char_server disconnect [MouseJstr]
diff --git a/src/map/clif.c b/src/map/clif.c
index 79ca0e227..bcccadfab 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -256,7 +256,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
break;
}
- if (sd) {
+ if ((sd != NULL) && (session[sd->fd] != NULL)) {
if (WFIFOP(sd->fd,0) == buf) {
printf("WARNING: Invalid use of clif_send function\n");
printf(" Packet x%4x use a WFIFO of a player instead of to use a buffer.\n", WBUFW(buf,0));