prevent save error crashes

This commit is contained in:
wish
2023-06-10 16:04:17 +10:00
committed by Houmgaor
parent 42018621c3
commit 633061caa1
2 changed files with 5 additions and 1 deletions

View File

@@ -247,7 +247,7 @@ func logoutPlayer(s *Session) {
removeSessionFromStage(s)
saveData, err := GetCharacterSaveData(s, s.charID)
if err != nil {
if err != nil || saveData == nil {
s.logger.Error("Failed to get savedata")
return
}