diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-20 22:51:08 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-20 22:51:08 +0300 |
commit | 2c940a1d8015601f5eea628b8940fde0547756d6 (patch) | |
tree | 79d51e362e11738655b148b75d2aa667afce762b /indra | |
parent | 0c852a025969437798e14c8c6c22c74246e091a0 (diff) |
SL-17633 Crash at LLFocusableElement
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 29 |
1 files 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<std::string>& filenames) return; } - LLPanelProfileSecondLife* panel = static_cast<LLPanelProfileSecondLife*>(mHandle->get()); - panel->setProfileImageUploading(true); + switch (mType) + { + case PROFILE_IMAGE_SL: + { + LLPanelProfileSecondLife* panel = static_cast<LLPanelProfileSecondLife*>(mHandle->get()); + panel->setProfileImageUploading(true); + } + break; + case PROFILE_IMAGE_FL: + { + LLPanelProfileFirstLife* panel = static_cast<LLPanelProfileFirstLife*>(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<LLPanel>(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) |