From c5d100a9e4595c0d3bc685e0d6a2972ef228013d Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 8 Jul 2009 00:05:02 +0000 Subject: 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. --- indra/newview/llremoteparcelrequest.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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) -- cgit v1.2.3