Merge pull request #3058 from pangeachat/3049-backing-out-of-new-account-avatar-selection-causes-avatar-display-error
chore: if user cancels image selection in user settings page, don't r…
This commit is contained in:
commit
755c79457e
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,10 @@ class UserSettingsState extends State<UserSettingsPage> {
|
|||
final bytes = await selectedFile?.readAsBytes();
|
||||
final path = selectedFile?.path;
|
||||
|
||||
if (bytes == null || path == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
selectedAvatarPath = null;
|
||||
avatar = bytes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue