From d372fa1a0fb8d25ed6fca4aba2f4a0291aec51e0 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 25 May 2014 14:47:45 -0400 Subject: [PATCH] Whoops, fixup locally experienced crash with lookat beacons. --- indra/newview/llhudeffectlookat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 7fc394442..d653c8283 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -550,8 +550,8 @@ void LLHUDEffectLookAt::render() static const LLCachedControl lookAtNames("LookAtNameSystem"); if (lookAtNames < 0) return; std::string text; - LLAvatarNameCache::getPNSName(static_cast(mSourceObject.get())->getID(), text, lookAtNames); - if (0 == text.compare(text.length() - 9, 9, " Resident")) + if (!LLAvatarNameCache::getPNSName(static_cast(mSourceObject.get())->getID(), text, lookAtNames)) return; + if (text.length() > 9 && 0 == text.compare(text.length() - 9, 9, " Resident")) text.erase(text.length() - 9); LLVector3 offset = gAgentCamera.getCameraPositionAgent() - target; offset.normalize();