diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2024-07-18 15:24:11 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2024-08-06 15:04:10 -0700 |
commit | ae2ff22542a5882616778ffab50612f8ad41b71e (patch) | |
tree | 6c2cc9ca9edf3cca18b39d0a3c8595f3199f23eb /indra | |
parent | d881c72a9a3a95aee60e2c2ef5d8f24e1902c17c (diff) |
NOISSUE: Prevent potential bad matrix state in HUD render
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 18 |
1 files 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(); } } } |