From ae2ff22542a5882616778ffab50612f8ad41b71e Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Thu, 18 Jul 2024 15:24:11 -0700 Subject: NOISSUE: Prevent potential bad matrix state in HUD render --- indra/newview/llviewerwindow.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index f6de8377f3..4bd1b98569 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4185,15 +4185,17 @@ void LLViewerWindow::renderSelections( bool for_gl_pick, bool pick_parcel_walls, } } } - if (selection->getSelectType() == SELECT_TYPE_HUD && selection->getObjectCount()) - { - gGL.matrixMode(LLRender::MM_PROJECTION); - gGL.popMatrix(); + } - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.popMatrix(); - stop_glerror(); - } + // un-setup HUD render + if (selection->getSelectType() == SELECT_TYPE_HUD && selection->getObjectCount()) + { + gGL.matrixMode(LLRender::MM_PROJECTION); + gGL.popMatrix(); + + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.popMatrix(); + stop_glerror(); } } } -- cgit v1.2.3