summaryrefslogtreecommitdiff
path: root/indra/newview/llwlhandlers.cpp
diff options
context:
space:
mode:
authorNicky <none@none>2012-08-28 23:53:16 +0200
committerNicky <none@none>2012-08-28 23:53:16 +0200
commit48631db986f4f16ba6810c4f91844066407d430d (patch)
tree1afbcce2c7ddb587bed9751d4a1e01207a6064b5 /indra/newview/llwlhandlers.cpp
parent86e84ae75ef86417be32cff9a22a48fd7853758c (diff)
Crashfix; During TP, or shortly after, gAgent.getRegion can be invalid. Handle that instead of crashing.
Diffstat (limited to 'indra/newview/llwlhandlers.cpp')
-rw-r--r--indra/newview/llwlhandlers.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index 2425b96678..be3e3ff30e 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -105,10 +105,16 @@ LLEnvironmentRequestResponder::LLEnvironmentRequestResponder()
return;
}
- if (unvalidated_content[0]["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
+ LLUUID regionId;
+ if( gAgent.getRegion() )
+ {
+ regionId = gAgent.getRegion()->getRegionID();
+ }
+
+ if (unvalidated_content[0]["regionID"].asUUID() != regionId )
{
LL_WARNS("WindlightCaps") << "Not in the region from where this data was received (wanting "
- << gAgent.getRegion()->getRegionID() << " but got " << unvalidated_content[0]["regionID"].asUUID()
+ << regionId << " but got " << unvalidated_content[0]["regionID"].asUUID()
<< ") - ignoring..." << LL_ENDL;
return;
}