Skip to content

Commit

Permalink
Merge pull request #6841 from thundernest/fix_export_settings
Browse files Browse the repository at this point in the history
Don't fail when exporting an identity without a sender name
  • Loading branch information
cketti authored Apr 24, 2023
2 parents ae2e34a + 9e7ee72 commit 975049e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ class SettingsExporter(

// Write name belonging to the identity
val name = prefs[prefix + IDENTITY_NAME_KEY + suffix] as String?
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
if (name != null) {
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
}

// Write email address belonging to the identity
val email = prefs[prefix + IDENTITY_EMAIL_KEY + suffix] as String?
Expand Down

0 comments on commit 975049e

Please sign in to comment.