summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2014-11-03 20:05:20 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2014-11-03 20:05:20 +0200
commit799d13269a5cdf29a5d68c15ceac42f0407b5833 (patch)
treeae1f17a27c9d1d02f302d2b5c73ed0aea25e8371 /indra/newview/llviewerdisplay.cpp
parentf3d73d9e724e9ae1062bf109b6764d43ccba3114 (diff)
MAINT-3585 FIXED Viewer Crashes when attempting to upload image.
The bug was fixed, the reasone of crash is following. The Core Flow view contain another GL context and will not care about restoring a previous. I restore context manually. This path also contain a minor changes in another files. All changes described here. Сhange's for fix current bug. indra/llwindow/llwindow.h indra/llwindow/llwindowheadless.h indra/llwindow/llwindowmacosx.h indra/llwindow/llwindowsdl.h indra/llwindow/llwindowwin32.h indra/newview/lllocalbitmaps.cpp indra/newview/llviewerdisplay.cpp indra/newview/llviewerdisplay.h Twice mUsage initialization (replace to forward initialization). indra/llcharacter/lljointstate.h Looks like condition should be befor memcopy call, otherwise - possible CRASH. indra/llcommon/llmd5.cpp Unused condition and variables. indra/llmath/llsphere.cpp Looks like should be under if otherwise - possible CRASH indra\llprimitive\llmodel.cpp Useless assert's. indra/llrender/llrender.cpp indra/newview/lldaycyclemanager.cpp
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rwxr-xr-xindra/newview/llviewerdisplay.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 981e4c40aa..dfbb128d3b 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1344,6 +1344,14 @@ void swap()
gDisplaySwapBuffers = TRUE;
}
+void restoreGLContext()
+{
+ if(gViewerWindow && gViewerWindow->getWindow())
+ {
+ gViewerWindow->getWindow()->restoreGLContext();
+ }
+}
+
void renderCoordinateAxes()
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);