drawinglayer/source/tools/converters.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 97f2027fa75deafc7d28db3a2efe96236320d181 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 13 20:09:02 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Aug 14 16:43:54 2022 +0200 check SetOutputSizePixel for failure Change-Id: If57dbbd7f04f0ee5286cf24a00480271bd4d9f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138237 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx index 2ba781386e49..2f657afedc69 100644 --- a/drawinglayer/source/tools/converters.cxx +++ b/drawinglayer/source/tools/converters.cxx @@ -76,7 +76,11 @@ namespace drawinglayer ScopedVclPtrInstance< VirtualDevice > pContent; // prepare vdev - pContent->SetOutputSizePixel(aSizePixel, false); + if (!pContent->SetOutputSizePixel(aSizePixel, false)) + { + SAL_WARN("vcl", "Cannot set VirtualDevice to size : " << aSizePixel.Width() << "x" << aSizePixel.Height()); + return aRetval; + } pContent->SetMapMode(aMapModePixel); // set to all white
