summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2014-07-30 09:02:30 +0200
committerSlávek Banko <[email protected]>2014-07-30 09:02:30 +0200
commitcbeacf0de9aae47bdc51931c1944f4d1f50cfb27 (patch)
tree0852ab86444f930ec406cee96bd46300d458041d
parentd738b733bddde7b7c17d990515c1e3c9eb22cf93 (diff)
downloadqt3-cbeacf0de9aae47bdc51931c1944f4d1f50cfb27.tar.gz
qt3-cbeacf0de9aae47bdc51931c1944f4d1f50cfb27.zip
Fixed "TQApplication::postEvent: Unexpected null receiver" warning message. This resolves bug 1901 and 1909.
-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));
}