diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-10-11 14:36:12 -0400 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2023-10-15 22:14:00 +0200 |
commit | 037507a9c9050c57a12d1a80f9ba4d62e0eeadea (patch) | |
tree | d1d3d3f26241b2dae74c648eeb9ff39acd20e065 | |
parent | 054b94ae27e1bdf83df423878a7776e2246ad8f9 (diff) |
tdf#157613 make sure surface is not a null pointerdistro/lhm/libreoffice-7-5+backports
Change-Id: I8e3c1be3f05f7ccc1f3ba00093cd71a564e5ae9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157848
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Tested-by: Patrick Luby <plubius@neooffice.org>
(cherry picked from commit bacdae0d6b0cec4de39812496f6ffafe04629411)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157871
Tested-by: Jenkins
-rw-r--r-- | vcl/skia/osx/gdiimpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx index fcb2d2181fc4..24847a410e7a 100644 --- a/vcl/skia/osx/gdiimpl.cxx +++ b/vcl/skia/osx/gdiimpl.cxx @@ -214,6 +214,11 @@ bool AquaSkiaSalGraphicsImpl::drawNativeControl(ControlType nType, ControlPart n const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue) { + // tdf#157613 make sure surface is not a nullptr + checkSurface(); + if (!mSurface) + return false; + // rControlRegion is not the whole area that the control should be painted to (e.g. highlight // around focused lineedit is outside of it). Since we draw to a temporary bitmap, we need tofind out // the real size. Using getNativeControlRegion() might seem like the function to call, but we need |