diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 2b8f89ac6e..bdec5ad327 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1801,8 +1801,7 @@ static void renderChatRangeSphere(const LLVector3& center, F32 radius, const LLC static void drawChatRangeSpheres() { - static LLCachedControl show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false); - if (!show_spheres() || !isAgentAvatarValid()) + if (!isAgentAvatarValid()) { return; } @@ -1855,7 +1854,11 @@ void render_ui_3d() } // Render chat range spheres in 3D world - drawChatRangeSpheres(); + static LLCachedControl show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false); + if (show_spheres()) + { + drawChatRangeSpheres(); + } // gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements