From b9867ca9e51b273bbd298d7a1ca5f893d5c3b219 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 1 Nov 2010 21:31:33 -0700 Subject: Fixed crash when logging into an Aurora sim without the region/estate window open --- linden/indra/newview/kowopenregionsettings.cpp | 7 +++---- linden/indra/newview/llfloaterregioninfo.cpp | 15 ++++++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp index f5a845a..86a426c 100644 --- a/linden/indra/newview/kowopenregionsettings.cpp +++ b/linden/indra/newview/kowopenregionsettings.cpp @@ -47,7 +47,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode const LLSD& context, const LLSD& input) const { - if (!input.isMap() || !input.has("body")) + if (!input || !context || !input.isMap() || !input.has("body")) { llinfos << "malformed OpenRegionInfo update!" << llendl; return; @@ -205,10 +205,9 @@ class OpenRegionInfoUpdate : public LLHTTPNode gFloaterTools->updateToolsSizeLimits(); //Update the floater if its around - LLPanelRegionOpenSettingsInfo* floater; - floater = LLFloaterRegionInfo::getPanelOpenSettings(); + LLPanelRegionOpenSettingsInfo* floater = LLFloaterRegionInfo::getPanelOpenSettings(); - if(floater != NULL) + if (floater != NULL) { floater->refreshFromRegion(gAgent.getRegion()); } diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index aca8db7..76e6b01 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -426,11 +426,16 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() LLPanelRegionOpenSettingsInfo* LLFloaterRegionInfo::getPanelOpenSettings() { LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); - if (!floater) return NULL; - LLTabContainer* tab = floater->getChild("region_panels"); - LLPanelRegionOpenSettingsInfo* panel; - panel = (LLPanelRegionOpenSettingsInfo*)tab->getChild("RegionSettings"); - return panel; + if (floater) + { + LLTabContainer* tab = floater->getChild("region_panels"); + LLPanelRegionOpenSettingsInfo* panel = (LLPanelRegionOpenSettingsInfo*)tab->getChild("RegionSettings", FALSE, FALSE); + if (panel) + { + return panel; + } + } + return NULL; } void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) -- cgit v1.1