summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/char_sql/char.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0a3815cf5..f7d5f58eb 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2008/04/14
+ * Fixed a possible crash in char_sql. (since r12575, later modified in r12590). [FlavioJS]
* Fixed a memory leak in mapif_quests_fromsql [Toms]
* Fixed a typo in char_sql/char.c [Toms]
* Fixed a bug in the disconnection part char-server (not sending you offline) [Toms]
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 3cc82eb42..992e7892a 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -297,7 +297,7 @@ void set_char_offline(int char_id, int account_id)
}
}
- if (login_fd > 0 && !session[login_fd]->flag.eof && character->char_id != -1)
+ if (login_fd > 0 && !session[login_fd]->flag.eof && (character == NULL || character->char_id != -1))
{
WFIFOHEAD(login_fd,6);
WFIFOW(login_fd,0) = 0x272c;