From cefb414b375e3d6be2b722507a9f17faefaae217 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 13 Dec 2011 15:53:51 +0000 Subject: handle failed bitmap storage allocation gracefully --- basebmp/source/bitmapdevice.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'basebmp') diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 6f208cf25ca7..ec0d3bb6981f 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -1889,6 +1889,8 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& pMem.reset( reinterpret_cast(rtl_allocateMemory( nMemSize )), &rtl_freeMemory ); + if (!pMem.get()) + return BitmapDeviceSharedPtr(); rtl_zeroMemory(pMem.get(),nMemSize); } -- cgit