prevent save error crashes

This commit is contained in:
wish
2023-06-10 16:04:17 +10:00
parent f40196b530
commit ba1eea81e7
2 changed files with 5 additions and 1 deletions

View File

@@ -245,7 +245,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
}