summaryrefslogtreecommitdiffstats
path: root/basebmp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-12-13 17:07:45 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-12-13 19:30:30 +0000
commit94d8de367cda097f868c28913337bae732e4e56b (patch)
tree3980505c49cb7b80475b8ce817dd05aafc6de317 /basebmp
parenthandle failed bitmap storage allocation gracefully (diff)
downloadcore-94d8de367cda097f868c28913337bae732e4e56b.tar.gz
core-94d8de367cda097f868c28913337bae732e4e56b.zip
Make LineTest::testCornerCases succeed again after last basebmp fix.
Though it looks wrong that rtl_allocateMemory(0) == 0.
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/source/bitmapdevice.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index ec0d3bb6981f..1586fce1cfb5 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -1889,7 +1889,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
pMem.reset(
reinterpret_cast<sal_uInt8*>(rtl_allocateMemory( nMemSize )),
&rtl_freeMemory );
- if (!pMem.get())
+ if (pMem.get() == 0 && nMemSize != 0)
return BitmapDeviceSharedPtr();
rtl_zeroMemory(pMem.get(),nMemSize);
}