From a645befdf60512fdce9c5584fa8eef5a34a7823e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 28 Aug 2022 09:43:24 +0100 Subject: [PATCH] Fix possible crash if calling repaint during construction Signed-off-by: falkTX --- dgl/src/SubWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dgl/src/SubWidget.cpp b/dgl/src/SubWidget.cpp index 75ca4dad..af1274a2 100644 --- a/dgl/src/SubWidget.cpp +++ b/dgl/src/SubWidget.cpp @@ -139,7 +139,8 @@ void SubWidget::repaint() noexcept if (TopLevelWidget* const topw = getTopLevelWidget()) { if (pData->needsFullViewportForDrawing) - topw->repaint(); + // repaint is virtual and we want precisely the top-level specific implementation, not any higher level + topw->TopLevelWidget::repaint(); else topw->repaint(getConstrainedAbsoluteArea()); }