diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-10-19 08:40:25 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-10-26 13:22:58 (GMT) |
commit | 586fc2a9ead06a8478bdc380b775f18000741745 (patch) | |
tree | e6749fb9bff1a2f5d8dd52c1139e84d38724446a /src | |
parent | f603ce9a960ee387ab10be1916da8ffd09305045 (diff) | |
download | Qt-586fc2a9ead06a8478bdc380b775f18000741745.zip Qt-586fc2a9ead06a8478bdc380b775f18000741745.tar.gz Qt-586fc2a9ead06a8478bdc380b775f18000741745.tar.bz2 |
Suppress call to controlVisibilityChanged for null control pointer
At this point, old_winid may be null. Passing a null pointer to
controlVisibilityChanged is actually a no-op, due to the
'QWidgetPrivate::mapper->contains(control)' check, but suppressing
the function call altogether clarifies the intent of the code
slightly.
Reviewed-by: Jason Barron
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 031892d..cf4bdf1 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -709,7 +709,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // old_winid may not have received a 'not visible' visibility // changed event before being destroyed; make sure that it is // removed from the backing store's list of visible windows. - S60->controlVisibilityChanged(old_winid, false); + if (old_winid) + S60->controlVisibilityChanged(old_winid, false); setWinId(0); |