diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-04 15:30:46 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-10-10 22:35:24 +0200 |
commit | 49bc0e58f14d921b9ac624639d9e417fd1289507 (patch) | |
tree | f871e8852857112c98dd37b7cef675a0a320be9d | |
parent | 7be01c3b3c41113a58aa41a561d684fb7d5fa83f (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit dbf34be458a2b5723084d1ed99390b744cee6053)
-rw-r--r-- | vcl/headless/svpgdi.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 90b9c07cd50c..e546b8f6b73c 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1229,6 +1229,11 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh } 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); |