Fix more crashes when viewer is disconnected
parent
aa015a0b90
commit
aa5c2e2e08
|
|
@ -160,11 +160,12 @@ BOOL AnimationExplorer::postBuild()
|
|||
mPreviewCtrl = findChild<LLView>("animation_preview");
|
||||
if (mPreviewCtrl)
|
||||
{
|
||||
mAnimationPreview = new LLPreviewAnimation(
|
||||
mPreviewCtrl->getRect().getWidth(),mPreviewCtrl->getRect().getHeight()
|
||||
);
|
||||
mAnimationPreview->setZoom(2.0f);
|
||||
startMotion(LLUUID::null);
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
mAnimationPreview = new LLPreviewAnimation(mPreviewCtrl->getRect().getWidth(), mPreviewCtrl->getRect().getHeight());
|
||||
mAnimationPreview->setZoom(2.0f);
|
||||
startMotion(LLUUID::null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ void LLFloaterLand::onOpen(const LLSD& key)
|
|||
mParcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
|
||||
|
||||
// <FS:Ansariel> FIRE-17280: Requesting Experience access allow & block list breaks OpenSim
|
||||
if (!LLViewerParcelMgr::getInstance()->getSelectionRegion()->isCapabilityAvailable("RegionExperiences"))
|
||||
LLViewerRegion* selected_region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
if (!selected_region || !selected_region->isCapabilityAvailable("RegionExperiences"))
|
||||
{
|
||||
mTabLand->removeTabPanel(mTabLand->getPanelByName("land_experiences_panel"));
|
||||
}
|
||||
|
|
@ -499,7 +500,10 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
// note: on region change this will not be re checked, should not matter on Agni as
|
||||
// 99% of the time all regions will return the same caps. In case of an erroneous setting
|
||||
// to enabled the floater will just throw an error when trying to get it's cap
|
||||
std::string url = gAgent.getRegion()->getCapability("LandResources");
|
||||
// <FS:Ansariel> Crash fix
|
||||
//std::string url = gAgent.getRegion()->getCapability("LandResources");
|
||||
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("LandResources") : "";
|
||||
// </FS:Ansariel>
|
||||
if (!url.empty())
|
||||
{
|
||||
mBtnScriptLimits = getChild<LLButton>("Scripts...");
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ BOOL LLFloaterRegionInfo::postBuild()
|
|||
|
||||
// <FS:CR> Aurora Sim - Region Settings Console
|
||||
// We only use this panel on Aurora-based sims
|
||||
std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
|
||||
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("DispatchOpenRegionSettings") : "";
|
||||
if (!url.empty())
|
||||
{
|
||||
panel = new LLPanelRegionOpenSettingsInfo;
|
||||
|
|
@ -250,7 +250,10 @@ BOOL LLFloaterRegionInfo::postBuild()
|
|||
panel->buildFromFile("panel_region_debug.xml");
|
||||
mTab->addTabPanel(panel);
|
||||
|
||||
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
// <FS:Ansariel> Crash fix
|
||||
//if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
if (gAgent.getRegion() && !gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
panel = new LLPanelRegionExperiences;
|
||||
mInfoPanels.push_back(panel);
|
||||
|
|
@ -876,7 +879,10 @@ protected:
|
|||
|
||||
void LLFloaterRegionInfo::requestMeshRezInfo()
|
||||
{
|
||||
std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
// <FS:Ansariel> Crash fix
|
||||
//std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string sim_console_url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("SimConsoleAsync") : "";
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (!sim_console_url.empty())
|
||||
{
|
||||
|
|
@ -904,6 +910,13 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
|
|||
{
|
||||
LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL;
|
||||
|
||||
// <FS:Ansariel> Crash fix
|
||||
if (!gAgent.getRegion())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// First try using a Cap. If that fails use the old method.
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
|
||||
|
|
@ -1052,7 +1065,7 @@ void LLPanelRegionOpenSettingsInfo::onClickOrs(void* userdata)
|
|||
LL_INFOS() << "LLPanelRegionOpenSettingsInfo::onClickOrs()" << LL_ENDL;
|
||||
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
|
||||
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("DispatchOpenRegionSettings") : "";
|
||||
if (!url.empty())
|
||||
{
|
||||
body["draw_distance"] = (LLSD::Integer)self->childGetValue("draw_distance");
|
||||
|
|
|
|||
Loading…
Reference in New Issue