diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2009-11-02 14:52:06 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2009-11-02 14:52:06 +0200 |
commit | 40197ed64f5c8238e0798bf5e665d0a2b271e8b8 (patch) | |
tree | 3a5f428788b124bfae863bf4c86e109020f91cd0 /indra/newview/llpanelplaceinfo.cpp | |
parent | 6bb24921564c05f8d3f83180e917421b3c27d28f (diff) |
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
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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<LLPanelPlaceInfo*>(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() |