vcl/qt5/Qt5Painter.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 181f19995d7c2c9759365ab664732504b2496063 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Tue Oct 27 16:46:08 2020 +0100 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Tue Oct 27 21:19:47 2020 +0100 Qt5 std::abort, if we're unable to paint If this crashes LO too often, we can revert it. It helped me to debug tdf#137804. Then we might need to work with exceptions or some other way to notifiy the creator of the Qt5Painter, that the constructor has failed. Much more work to handle all sites using Qt5Painter... Change-Id: I81cd18770dc93d8dd1542972cd4fc220dd0dce09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104894 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/vcl/qt5/Qt5Painter.cxx b/vcl/qt5/Qt5Painter.cxx index 06eeb2895214..ce59bbe96d08 100644 --- a/vcl/qt5/Qt5Painter.cxx +++ b/vcl/qt5/Qt5Painter.cxx @@ -25,11 +25,15 @@ Qt5Painter::Qt5Painter(Qt5Graphics& rGraphics, bool bPrepareBrush, sal_uInt8 nTr : m_rGraphics(rGraphics) { if (rGraphics.m_pQImage) - begin(rGraphics.m_pQImage); + { + if (!begin(rGraphics.m_pQImage)) + std::abort(); + } else { assert(rGraphics.m_pFrame); - begin(rGraphics.m_pFrame->GetQWidget()); + if (!begin(rGraphics.m_pFrame->GetQWidget())) + std::abort(); } if (!rGraphics.m_aClipPath.isEmpty()) setClipPath(rGraphics.m_aClipPath); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits