diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-04-02 03:31:01 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-04-08 04:38:20 +0200 |
commit | 8325b7b49ec095349571efb17fe0d520ab67f897 (patch) | |
tree | a0b9e6753cc434f7989668257fa4d3b001278f52 /vcl | |
parent | feffcbb02c2cb17d615151f5587ae38510f3aa02 (diff) |
prevent initializing the OpenGL context multiple times
Change-Id: I2ebdbcd51938bc1dc61693ac392eed5d5e497a8d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index e5500d413da5..b60e6f58739a 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -13,7 +13,8 @@ using namespace com::sun::star; -OpenGLContext::OpenGLContext() +OpenGLContext::OpenGLContext(): + mbInitialized(false) { } @@ -319,6 +320,9 @@ int oglErrorHandler( Display* /*dpy*/, XErrorEvent* /*evnt*/ ) bool OpenGLContext::init( Window* pParent ) { m_pWindow.reset(pParent ? pParent : new Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)); + if(mbInitialized) + return true; + SAL_INFO("vcl.opengl", "OpenGLContext::OpenGLContext----start"); initWindow(); m_pWindow->setPosSizePixel(0,0,0,0); @@ -441,6 +445,7 @@ bool OpenGLContext::init( Window* pParent ) #endif SAL_INFO("vcl.opengl", "OpenGLContext::init----end"); + mbInitialized = true; return true; } |