mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-02 08:09:35 +00:00
Fix two crashes in own profile photo edit.
This commit is contained in:
parent
232fceeee6
commit
71354d1611
@ -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…
Reference in New Issue
Block a user