From 2c940a1d8015601f5eea628b8940fde0547756d6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 20 Jun 2022 22:51:08 +0300 Subject: SL-17633 Crash at LLFocusableElement --- indra/newview/llpanelprofile.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 559e6abfdb..d531bee79f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -1448,8 +1448,21 @@ void LLProfileImagePicker::notify(const std::vector& filenames) return; } - LLPanelProfileSecondLife* panel = static_cast(mHandle->get()); - panel->setProfileImageUploading(true); + switch (mType) + { + case PROFILE_IMAGE_SL: + { + LLPanelProfileSecondLife* panel = static_cast(mHandle->get()); + panel->setProfileImageUploading(true); + } + break; + case PROFILE_IMAGE_FL: + { + LLPanelProfileFirstLife* panel = static_cast(mHandle->get()); + panel->setProfileImageUploading(true); + } + break; + } LLCoros::instance().launch("postAgentUserImageCoro", boost::bind(post_profile_image_coro, cap_url, mType, temp_file, mHandle)); @@ -2156,6 +2169,12 @@ void LLPanelProfileFirstLife::commitUnsavedChanges() void LLPanelProfileFirstLife::onUploadPhoto() { (new LLProfileImagePicker(PROFILE_IMAGE_FL, new LLHandle(getHandle())))->getFile(); + + LLFloater* floaterp = mFloaterTexturePickerHandle.get(); + if (floaterp) + { + floaterp->closeFloater(); + } } void LLPanelProfileFirstLife::onChangePhoto() @@ -2226,6 +2245,12 @@ void LLPanelProfileFirstLife::onChangePhoto() void LLPanelProfileFirstLife::onRemovePhoto() { onCommitPhoto(LLUUID::null); + + LLFloater* floaterp = mFloaterTexturePickerHandle.get(); + if (floaterp) + { + floaterp->closeFloater(); + } } void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id) -- cgit v1.2.3