diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index 4a512e274d..f92dffdbc2 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -443,15 +443,14 @@ void Cover::refreshUploadPhotoOverlay() { Unexpected("Peer type in Info::Profile::Cover."); }(), [=](Ui::UserpicButton::ChosenImage chosen) { using ChosenType = Ui::UserpicButton::ChosenType; - auto &image = chosen.image; auto result = Api::PeerPhoto::UserPhoto{ - std::move(image), + base::take(chosen.image), chosen.markup.documentId, chosen.markup.colors, }; switch (chosen.type) { case ChosenType::Set: - _userpic->showCustom(base::duplicate(image)); + _userpic->showCustom(base::duplicate(result.image)); _peer->session().api().peerPhoto().upload( _peer, std::move(result));