summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-12-13 15:53:51 +0000
committerMichael Meeks <michael.meeks@suse.com>2011-12-13 15:54:28 +0000
commitcefb414b375e3d6be2b722507a9f17faefaae217 (patch)
tree4640f61d779fdcdfc0af143f08758edecc8007ad /basebmp
parent9ffe57dc020dc2658e2f326dc399fe0da0641050 (diff)
handle failed bitmap storage allocation gracefully
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/source/bitmapdevice.cxx2
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);
}