1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(profile): don't error if no new avatar is selected

This commit is contained in:
Anthony Bilinski 2018-04-05 11:29:57 -07:00
parent ff578413c1
commit cfdc1cdb2e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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;