diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 08:48:43 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 08:58:23 (GMT) |
commit | d705f5cd9d3bac765346af361038f2f9249183e7 (patch) | |
tree | f7c35ebc9de0bd5660e39218c199d53e137d248a | |
parent | dacfd67ad35ed3edb079e9795088f852b98717e3 (diff) | |
download | Qt-d705f5cd9d3bac765346af361038f2f9249183e7.zip Qt-d705f5cd9d3bac765346af361038f2f9249183e7.tar.gz Qt-d705f5cd9d3bac765346af361038f2f9249183e7.tar.bz2 |
Fix crash after "Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support"
tst_QGraphicsProxyWidget crashed because the QAlphaWidget tried to access a
deleted widget. Before we had the if check, but that was removed
with this commit: 55137901. Completely wrong, we must check the widget pointer
before using it.
Reviewed-by: jbache
-rw-r--r-- | src/gui/widgets/qeffects.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qeffects.cpp b/src/gui/widgets/qeffects.cpp index d6d0a16..f3b1b76 100644 --- a/src/gui/widgets/qeffects.cpp +++ b/src/gui/widgets/qeffects.cpp @@ -128,7 +128,8 @@ QAlphaWidget::~QAlphaWidget() { #if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) // Restore user-defined opacity value - widget->setWindowOpacity(windowOpacity); + if (widget) + widget->setWindowOpacity(windowOpacity); #endif } |