Browse Source

Fix possible crash if calling repaint during construction

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/merge
falkTX 2 years ago
parent
commit
a645befdf6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      dgl/src/SubWidget.cpp

+ 2
- 1
dgl/src/SubWidget.cpp View File

@@ -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());
}


Loading…
Cancel
Save