vcl/source/opengl/OpenGLContext.cxx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
New commits: commit f1e4ea6d59964e2488d622255843b16aec422d29 Author: Markus Mohrhard <[email protected]> Date: Wed Nov 5 18:29:40 2014 +0100 prevent invalid memory access in dbgutil code Change-Id: I071a9375868c1cb262c4f45871ad7d3c26bb7271 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index a340304..b1cec57 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -573,14 +573,19 @@ bool OpenGLContext::ImplInit() if (!pFBC) return false; - int nContextAttribs[] = + if (best_fbc != -1) { - GLX_CONTEXT_MAJOR_VERSION_ARB, 3, - GLX_CONTEXT_MINOR_VERSION_ARB, 2, - None - }; - m_aGLWin.ctx = glXCreateContextAttribsARB(m_aGLWin.dpy, pFBC[best_fbc], 0, GL_TRUE, nContextAttribs); - SAL_INFO_IF(m_aGLWin.ctx, "vcl.opengl", "created a 3.2 core context"); + int nContextAttribs[] = + { + GLX_CONTEXT_MAJOR_VERSION_ARB, 3, + GLX_CONTEXT_MINOR_VERSION_ARB, 2, + None + }; + m_aGLWin.ctx = glXCreateContextAttribsARB(m_aGLWin.dpy, pFBC[best_fbc], 0, GL_TRUE, nContextAttribs); + SAL_INFO_IF(m_aGLWin.ctx, "vcl.opengl", "created a 3.2 core context"); + } + else + SAL_WARN("vcl.opengl", "unable to find correct FBC"); } #endif _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
