diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-08-21 16:06:22 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-08-21 17:40:47 +0200 |
commit | 89dd08d15fbe57e3fbeac9a7a9906efd42788c74 (patch) | |
tree | adf5bf68f3b73e3664479b5d5d4bfc2ee15697fb | |
parent | feccd4363b46d28b084d344815b335bcabfac6d6 (diff) |
Qt5SvpGraphics::handleDamage: Don't leak BitmapBuffer
Leak found by valgrind.
Change-Id: If2d03e94467210bc0e485e6a81bf8480a958323d
Reviewed-on: https://gerrit.libreoffice.org/77889
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | vcl/qt5/Qt5SvpGraphics.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/qt5/Qt5SvpGraphics.cxx b/vcl/qt5/Qt5SvpGraphics.cxx index 4edf55d55644..fc58bbcfcc15 100644 --- a/vcl/qt5/Qt5SvpGraphics.cxx +++ b/vcl/qt5/Qt5SvpGraphics.cxx @@ -81,12 +81,12 @@ void Qt5SvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) QImage* pImage = static_cast<Qt5Graphics_Controls*>(m_pWidgetDraw.get())->getImage(); assert(pImage); - BitmapBuffer* pBuffer = new BitmapBuffer; - QImage2BitmapBuffer(*pImage, *pBuffer); + BitmapBuffer aBuffer; + QImage2BitmapBuffer(*pImage, aBuffer); SalTwoRect aTR(0, 0, pImage->width(), pImage->height(), rDamagedRegion.getX(), rDamagedRegion.getY(), rDamagedRegion.GetWidth(), rDamagedRegion.GetHeight()); - drawBitmap(aTR, pBuffer, CAIRO_OPERATOR_OVER); + drawBitmap(aTR, &aBuffer, CAIRO_OPERATOR_OVER); } void Qt5SvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) |