From 7e2db04621a55dd89c247a6df2c8bedb9f8e7eb7 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 30 Jul 2014 09:02:30 +0200 Subject: [PATCH] Fixed "TQApplication::postEvent: Unexpected null receiver" warning message. This resolves bug 1901 and 1909. (cherry picked from commit cbeacf0de9aae47bdc51931c1944f4d1f50cfb27) --- src/kernel/qwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); }