diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bbeb286a0..34a86f70b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4548,35 +4548,34 @@ void LLAppViewer::disconnectViewer() if (gFloaterView) { gFloaterView->restoreAll(); - } - - std::list floaters_to_close; - for(LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin(); - it != gFloaterView->getChildList()->end(); - ++it) - { - // The following names are defined in the - // floater_image_preview.xml - // floater_sound_preview.xml - // floater_animation_preview.xml - // files. - LLFloater* fl = static_cast(*it); - if(fl - && (fl->getName() == "Image Preview" - || fl->getName() == "Sound Preview" - || fl->getName() == "Animation Preview" - )) + std::list floaters_to_close; + for (LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin(); + it != gFloaterView->getChildList()->end(); + ++it) { - floaters_to_close.push_back(fl); + // The following names are defined in the + // floater_image_preview.xml + // floater_sound_preview.xml + // floater_animation_preview.xml + // files. + LLFloater* fl = static_cast(*it); + if (fl + && (fl->getName() == "Image Preview" + || fl->getName() == "Sound Preview" + || fl->getName() == "Animation Preview" + )) + { + floaters_to_close.push_back(fl); + } + } + + while (!floaters_to_close.empty()) + { + LLFloater* fl = floaters_to_close.front(); + floaters_to_close.pop_front(); + fl->close(); } - } - - while(!floaters_to_close.empty()) - { - LLFloater* fl = floaters_to_close.front(); - floaters_to_close.pop_front(); - fl->close(); } } diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 5026929da..010a83916 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -325,10 +325,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj) { LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR); - cav->mRootVolp = obj; + if (cav) + { + cav->mRootVolp = obj; - // Sync up position/rotation with object - cav->matchVolumeTransform(); + // Sync up position/rotation with object + cav->matchVolumeTransform(); + } return cav; } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 44599742d..b24c1ac89 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1530,6 +1530,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) instance_entry["material"] = LL_MCODE_WOOD; instance_entry["physics_shape_type"] = data.mModel[LLModel::LOD_PHYSICS].notNull() ? (U8)(LLViewerObject::PHYSICS_SHAPE_PRIM) : (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); instance_entry["mesh"] = mesh_index[data.mBaseModel]; + instance_entry["mesh_name"] = instance.mLabel; instance_entry["face_list"] = LLSD::emptyArray(); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f0ca03ab7..80a115973 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1355,16 +1355,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { - if (objectp->isDead()) - { - // This object is already dead. Don't need to do more. - return TRUE; - } - else - { - objectp->markDead(); - } - + // We are going to cleanup a lot of smart pointers to this object, they might be last, + // and object being NULLed while inside it's own function won't be pretty + // so create a pointer to make sure object will stay alive untill markDead() finishes + LLPointer sp(objectp); + sp->markDead(); // does the right thing if object already dead return TRUE; } return FALSE; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ebd2376ed..7266df346 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -442,6 +442,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& if (!imagep.isNull()) { + if (boost_priority != LLViewerTexture::BOOST_ALM && imagep->getBoostLevel() == LLViewerTexture::BOOST_ALM) + { + // Workaround: we need BOOST_ALM texture for something, 'rise' to NONE + imagep->setBoostLevel(LLViewerTexture::BOOST_NONE); + } + LLViewerFetchedTexture *texture = imagep.get(); if (texture->getUrl().empty()) {