mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-04 09:09:45 +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),
|
std::move(callback),
|
||||||
track->frame(FrameRequest()).mirrored(true, false));
|
track->frame(FrameRequest()).mirrored(true, false));
|
||||||
box->closeBox();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
box->setTitle(tr::lng_profile_camera_title());
|
box->setTitle(tr::lng_profile_camera_title());
|
||||||
@ -274,10 +273,12 @@ void UserpicButton::choosePhotoLocally() {
|
|||||||
const auto user = _peer ? _peer->asUser() : nullptr;
|
const auto user = _peer ? _peer->asUser() : nullptr;
|
||||||
const auto name = (user && !user->firstName.isEmpty())
|
const auto name = (user && !user->firstName.isEmpty())
|
||||||
? user->firstName
|
? user->firstName
|
||||||
: _peer->name();
|
: _peer
|
||||||
|
? _peer->name()
|
||||||
|
: QString();
|
||||||
const auto phrase = (type == ChosenType::Suggest)
|
const auto phrase = (type == ChosenType::Suggest)
|
||||||
? &tr::lng_profile_suggest_sure
|
? &tr::lng_profile_suggest_sure
|
||||||
: (_peer->isUser() && !_peer->isSelf())
|
: (user && !user->isSelf())
|
||||||
? &tr::lng_profile_set_personal_sure
|
? &tr::lng_profile_set_personal_sure
|
||||||
: nullptr;
|
: nullptr;
|
||||||
PrepareProfilePhotoFromFile(
|
PrepareProfilePhotoFromFile(
|
||||||
|
Loading…
Reference in New Issue
Block a user