diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-12-13 15:53:51 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-12-13 15:54:28 +0000 |
commit | cefb414b375e3d6be2b722507a9f17faefaae217 (patch) | |
tree | 4640f61d779fdcdfc0af143f08758edecc8007ad | |
parent | 9ffe57dc020dc2658e2f326dc399fe0da0641050 (diff) |
handle failed bitmap storage allocation gracefully
-rw-r--r-- | basebmp/source/bitmapdevice.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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<sal_uInt8*>(rtl_allocateMemory( nMemSize )), &rtl_freeMemory ); + if (!pMem.get()) + return BitmapDeviceSharedPtr(); rtl_zeroMemory(pMem.get(),nMemSize); } |