[Libreoffice-commits] .: Branch 'libreoffice-3-5' - basebmp/source

Michael Meeks michael at kemper.freedesktop.org
Tue Dec 13 08:03:28 PST 2011


 basebmp/source/bitmapdevice.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0b557823581833e1f3da6d9cc3c44fa22d285fd3
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Dec 13 15:53:51 2011 +0000

    handle failed bitmap storage allocation gracefully

diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 6f208cf..ec0d3bb 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);
     }
 


More information about the Libreoffice-commits mailing list