[Libreoffice-commits] core.git: vcl/headless

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Aug 4 20:23:48 UTC 2018


 vcl/headless/svpgdi.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 4f50129e54c8b4a78e35dc869fd1f5fbc5aa9a87
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 4 15:30:46 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Aug 4 22:23:28 2018 +0200

    crashtesting: bubble surface creation failure notification upwards
    
    e.g. on converting moz858095-2.svg to odg
    
    Change-Id: I1a222f1745cff9c4cb225f6c0c216072fb17b4f7
    Reviewed-on: https://gerrit.libreoffice.org/58587
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index f4a7dd71dcbb..f8ada21f8acd 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1342,6 +1342,11 @@ std::shared_ptr<SalBitmap> SvpSalGraphics::getBitmap( long nX, long nY, long nWi
     }
 
     cairo_surface_t* target = SvpSalGraphics::createCairoSurface(pBitmap->GetBuffer());
+    if (!target)
+    {
+        SAL_WARN("vcl.gdi", "SvpSalGraphics::getBitmap, cannot create cairo surface");
+        return nullptr;
+    }
     cairo_t* cr = cairo_create(target);
 
     SalTwoRect aTR(nX, nY, nWidth, nHeight, 0, 0, nWidth, nHeight);


More information about the Libreoffice-commits mailing list