summaryrefslogtreecommitdiff
path: root/indra/newview/llremoteparcelrequest.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-07-08 00:05:02 +0000
committerJames Cook <james@lindenlab.com>2009-07-08 00:05:02 +0000
commitc5d100a9e4595c0d3bc685e0d6a2972ef228013d (patch)
tree2473c413d3c67a99a7ad1bffe49773b5174ac77c /indra/newview/llremoteparcelrequest.cpp
parentb2052d69d6418346b2f918ae8bf128fce1b08e22 (diff)
EXT-133 Crash when teleporting from "About Landmark" dialog. If the dialog was closed before the simulator returned information about the land parcel, LLRemoteParcelRequestResponder would dereference a null observer/panel pointer. Introduced into viewer-2.0.0-2 revision 124991 from Product Engine merge, see https://svn.lindenlab.com/viewvc/viewvc.cgi/linden/branches/viewer/viewer-2.0.0-2-pe/indra/newview/llremoteparcelrequest.cpp?r1=124880&r2=124881&pathrev=124881&limit_changes=100 Reviewed with Richard.
Diffstat (limited to 'indra/newview/llremoteparcelrequest.cpp')
-rw-r--r--indra/newview/llremoteparcelrequest.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index fe4e8b5d0c..1ac0175b83 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -57,7 +57,13 @@ void LLRemoteParcelRequestResponder::result(const LLSD& content)
{
LLUUID parcel_id = content["parcel_id"];
- mObserverHandle.get()->setParcelID(parcel_id);
+ // Panel inspecting the information may be closed and destroyed
+ // before this response is received.
+ LLRemoteParcelInfoObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ observer->setParcelID(parcel_id);
+ }
}
//If we get back an error (not found, etc...), handle it here
@@ -67,7 +73,13 @@ void LLRemoteParcelRequestResponder::error(U32 status, const std::string& reason
llinfos << "LLRemoteParcelRequest::error("
<< status << ": " << reason << ")" << llendl;
- mObserverHandle.get()->setErrorStatus(status, reason);
+ // Panel inspecting the information may be closed and destroyed
+ // before this response is received.
+ LLRemoteParcelInfoObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ observer->setErrorStatus(status, reason);
+ }
}
void LLRemoteParcelInfoProcessor::addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer)