summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernel/qwidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp
index 2b36de6..461c7f3 100644
--- a/src/kernel/qwidget.cpp
+++ b/src/kernel/qwidget.cpp
@@ -5984,9 +5984,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));
}