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 16:03:24 +0000 |
commit | 0b557823581833e1f3da6d9cc3c44fa22d285fd3 (patch) | |
tree | a757bb7c4dad9450bb99a15907f138437c1705ed | |
parent | 9aee78bf2683d8acdaf0c35bc35a12e726d61706 (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); } |