diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 856907c..20d86dc 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -5943,9 +5943,9 @@ QWidget *QWidget::childAt( const QPoint & p, bool includeThis ) const void QWidget::updateGeometry() { - if ( !isTopLevel() && isShown() ) - QApplication::postEvent( parentWidget(), - new QEvent( QEvent::LayoutHint ) ); + QWidget *parent = parentWidget(); + if (parent && !isTopLevel() && isShown()) + QApplication::postEvent(parent, new QEvent(QEvent::LayoutHint)); }