diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-23 20:02:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-24 09:58:02 +0100 |
commit | 288e02549bed317730eff0d169f6bdb75c8f40ce (patch) | |
tree | 3843f4ac3c5508d8a883b3c8c0de141ac898426f /vcl | |
parent | 16b0bbb671a8080655e27542e576478486810404 (diff) |
Resolves: tdf#131507 createCairoSurface returns nullptr on failure
Change-Id: I05190a6f280ebbe750dfda56ef27d3362222b95f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90940
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 6a5a7a23bfac..4f80ae366bfd 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -374,7 +374,7 @@ namespace unsigned long nTargetWidth = 0, unsigned long nTargetHeight = 0) const { - if(bDisableDownScale || 0 == nTargetWidth || 0 == nTargetHeight || isTrivial()) + if (bDisableDownScale || 0 == nTargetWidth || 0 == nTargetHeight || !pSurface || isTrivial()) { // caller asks for original or disabled or trivial (smaller then a minimal square size) // also excludes zero cases for width/height after this point if need to prescale |