summaryrefslogtreecommitdiff
path: root/vcl/source/app/svdata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/svdata.cxx')
-rw-r--r--vcl/source/app/svdata.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 0aaff4a14e05..1485305166ee 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -39,6 +39,7 @@
#include "vcl/dockwin.hxx"
#include "salinst.hxx"
#include "salframe.hxx"
+#include "salgdi.hxx"
#include "svdata.hxx"
#include "window.h"
#include "salimestatus.hxx"
@@ -49,6 +50,8 @@
#include "officecfg/Office/Common.hxx"
+#include "vcl/opengl/OpenGLContext.hxx"
+
#include <stdio.h>
using namespace com::sun::star::uno;
@@ -132,6 +135,11 @@ vcl::Window* ImplGetDefaultWindow()
DBG_WARNING( "ImplGetDefaultWindow(): No AppWindow" );
pSVData->mpDefaultWin = new WorkWindow( 0, WB_DEFAULTWIN );
pSVData->mpDefaultWin->SetText( OUString( "VCL ImplGetDefaultWindow" ) );
+
+ // Add a reference to the default context so it never gets deleted
+ OpenGLContext* pContext = pSVData->mpDefaultWin->GetGraphics()->GetOpenGLContext();
+ if( pContext )
+ pContext->AddRef();
}
Application::GetSolarMutex().release();
}