From fb7e4ff9855bab4b06583f65198247ccfcc6599a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 31 Jan 2012 08:14:28 +0100 Subject: Fix a crash when changeEvent() is called and there is no container When changeEvent() was called and no container had been set up then it would crash because it uses container without checking if it exists. Task-number: QTBUG-23957 Change-Id: I67393bf5c9bc5b437b92ee2c1b72ffbd5cd12af3 Sanity-Review: Qt Sanity Bot Reviewed-by: Martin Petersson (cherry picked from commit c36006f45fdcbdb97cbc3179c4ecc25203898fc5) --- src/activeqt/container/qaxwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index e07099a..92a1e11 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -2148,7 +2148,7 @@ QSize QAxWidget::minimumSizeHint() const */ void QAxWidget::changeEvent(QEvent *e) { - if (isNull()) + if (isNull() || !container) return; switch (e->type()) { -- cgit v0.12