From 40197ed64f5c8238e0798bf5e665d0a2b271e8b8 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Mon, 2 Nov 2009 14:52:06 +0200 Subject: fixed Bug EXT-2058 Viewer crash after disconecting when Panel Place Profile is opened Cause: idle callback was called after viewer had been disconnected and agent's region object was NOT available. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelplaceinfo.cpp') diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 5af27a5ec1..34644cfe42 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -54,6 +54,7 @@ #include "llaccordionctrltab.h" #include "llagent.h" #include "llagentui.h" +#include "llappviewer.h" #include "llavatarpropertiesprocessor.h" #include "llcallbacklist.h" #include "llexpandabletextbox.h" @@ -1003,13 +1004,15 @@ void LLPanelPlaceInfo::updateYouAreHereBanner(void* userdata) LLPanelPlaceInfo* self = static_cast(userdata); if(!self->getVisible()) return; + if(!gDisconnected) + { + static F32 radius = gSavedSettings.getF32("YouAreHereDistance"); - static F32 radius = gSavedSettings.getF32("YouAreHereDistance"); - - BOOL display_banner = self->mLastSelectedRegionID == gAgent.getRegion()->getRegionID() && + BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && LLAgentUI::checkAgentDistance(self->mPosRegion, radius); - self->mYouAreHerePanel->setVisible(display_banner); + self->mYouAreHerePanel->setVisible(display_banner); + } } void LLPanelPlaceInfo::onForSaleBannerClick() -- cgit v1.2.3