Fix deserialization multiaccounts

This commit is contained in:
Andrea Maria Piana 2022-04-12 15:09:42 +01:00 committed by Richard Ramos
parent 4c993a8610
commit 23c9618b0e
2 changed files with 6 additions and 4 deletions

View File

@ -1 +1 @@
0.98.1
0.98.2

View File

@ -93,9 +93,11 @@ func (db *Database) GetAccounts() (rst []Account, err error) {
acc.Timestamp = accLoginTimestamp.Int64
acc.Identicon = accIdenticon.String
acc.ColorID = accColorID.Int64
err = json.Unmarshal([]byte(accColorHash.String), &acc.ColorHash)
if err != nil {
return nil, err
if len(accColorHash.String) != 0 {
err = json.Unmarshal([]byte(accColorHash.String), &acc.ColorHash)
if err != nil {
return nil, err
}
}
ii.KeyUID = acc.KeyUID