commit a645befdf60512fdce9c5584fa8eef5a34a7823e
parent 4430cd248559eb34041ed202c31cb46ce9e04754
Author: falkTX <falktx@falktx.com>
Date: Sun, 28 Aug 2022 09:42:57 +0100
Fix possible crash if calling repaint during construction
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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());
}