Fix nil pointer on database.UpdateLine().

This commit is contained in:
chteufleur 2017-07-31 14:33:19 +02:00
parent 8a52613171
commit f72f1653d0
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,9 @@ func (newLine *DatabaseLine) UpdateLine() bool {
}
if newLine.SteamPwd == "" {
oldLine := GetLine(newLine.Jid)
newLine.SteamPwd = oldLine.SteamPwd
if oldLine != nil {
newLine.SteamPwd = oldLine.SteamPwd
}
}
_, err = stmt.Exec(newLine.SteamLogin, newLine.SteamPwd, debug, newLine.Jid)
if err != nil {