mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix two crashes in own profile photo edit.
This commit is contained in:
parent
232fceeee6
commit
71354d1611
1 changed files with 4 additions and 3 deletions
|
@ -91,7 +91,6 @@ void CameraBox(
|
|||
},
|
||||
std::move(callback),
|
||||
track->frame(FrameRequest()).mirrored(true, false));
|
||||
box->closeBox();
|
||||
};
|
||||
|
||||
box->setTitle(tr::lng_profile_camera_title());
|
||||
|
@ -274,10 +273,12 @@ void UserpicButton::choosePhotoLocally() {
|
|||
const auto user = _peer ? _peer->asUser() : nullptr;
|
||||
const auto name = (user && !user->firstName.isEmpty())
|
||||
? user->firstName
|
||||
: _peer->name();
|
||||
: _peer
|
||||
? _peer->name()
|
||||
: QString();
|
||||
const auto phrase = (type == ChosenType::Suggest)
|
||||
? &tr::lng_profile_suggest_sure
|
||||
: (_peer->isUser() && !_peer->isSelf())
|
||||
: (user && !user->isSelf())
|
||||
? &tr::lng_profile_set_personal_sure
|
||||
: nullptr;
|
||||
PrepareProfilePhotoFromFile(
|
||||
|
|
Loading…
Add table
Reference in a new issue