Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(profile): don't error if no new avatar is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed Apr 6, 2018
1 parent ff57841 commit cfdc1cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/widget/form/profileform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ void ProfileForm::onAvatarClicked()
const QString path = QFileDialog::getOpenFileName(Q_NULLPTR, tr("Choose a profile picture"),
QDir::homePath(), filter, nullptr);

if (path.isEmpty()) {
return;
}
const IProfileInfo::SetAvatarResult result = profileInfo->setAvatar(path);
if (result == IProfileInfo::SetAvatarResult::OK) {
return;
Expand Down

0 comments on commit cfdc1cd

Please sign in to comment.