summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/gdiimpl.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 6858a2adbae7..8deae07a3b77 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1722,20 +1722,19 @@ void OpenGLSalGraphicsImpl::drawMask(
PostBatchDraw();
}
-SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long nHeight )
+std::shared_ptr<SalBitmap> OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long nHeight )
{
FlushDeferredDrawing();
OpenGLZone aZone;
- OpenGLSalBitmap* pBitmap = new OpenGLSalBitmap;
+ std::shared_ptr<OpenGLSalBitmap> pBitmap(std::make_shared<OpenGLSalBitmap>());
VCL_GL_INFO( "::getBitmap " << nX << "," << nY <<
" " << nWidth << "x" << nHeight );
//TODO really needed?
PreDraw();
if( !pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ) )
{
- delete pBitmap;
pBitmap = nullptr;
}
PostDraw();