summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 5271214fd5af..3e838eacf2d7 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -566,8 +566,6 @@ void OpenGLContext::renderToFile()
bool OpenGLContext::initWindow()
{
- const SystemEnvData* sysData(mpWindow->GetSystemData());
- m_aGLWin.hWnd = sysData->hWnd;
if( !m_pChildWindow )
{
SystemWindowData winData = generateWinData(mpWindow);
@@ -583,6 +581,8 @@ bool OpenGLContext::initWindow()
m_pChildWindow->SetControlForeground();
m_pChildWindow->SetControlBackground();
m_pChildWindow->EnablePaint(sal_False);
+
+ const SystemEnvData* sysData(m_pChildWindow->GetSystemData());
m_aGLWin.hWnd = sysData->hWnd;
}