diff options
Diffstat (limited to 'vcl/source/app/svdata.cxx')
-rw-r--r-- | vcl/source/app/svdata.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index dea142959463..59b2d23cd2bc 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; @@ -129,6 +132,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(); } |