summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-04 15:30:46 +0100
committerAndras Timar <andras.timar@collabora.com>2021-05-10 16:33:50 +0200
commitd114007a25b4ccd590818cfe8fefd91ddfeb7969 (patch)
treeccb312ce8b75babfee6b1111245728d732cd4679 /vcl
parenta37bd33953d2354462bab7d4c8f4142a027d10ac (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)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpgdi.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 5881eeacf0f0..7025edbc6a2d 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1161,6 +1161,11 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal);
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);