fix crash in WallpaperImpl destructor
after commit b6f3b2b0ab9404917b7805bb89701c110b468768
"tdf#62525 vcl: use cow_wrapper for wall"
OutputDevice::DrawBitmapWallpaper passes a stack allocated object to
Wallpaper::ImplSetCachedBitmap, which in turns takes a pointer to that
object, and then unconditionally deletes that object in it's destructor.
The original code did a
*mpCache = rBmp
so restore that.
Change-Id: Ie65fb84e48750bb2c698dc08e0b6c5c7a0dea694
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index f69e3ab..7f81368 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -202,10 +202,9 @@ Wallpaper::~Wallpaper()
void Wallpaper::ImplSetCachedBitmap( BitmapEx& rBmp ) const
{
if( !mpImplWallpaper->mpCache )
const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = new BitmapEx( rBmp );
else
const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = &rBmp;
if( mpImplWallpaper->mpCache )
delete const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache;
const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = new BitmapEx( rBmp );
}
const BitmapEx* Wallpaper::ImplGetCachedBitmap() const