From bbc8e0c87e0969478ad958684a4111920ccd6567 Mon Sep 17 00:00:00 2001 From: Marius Bugge Monsen Date: Mon, 22 Jun 2009 14:34:29 +0200 Subject: Check for null pointer in QGraphicsProxyWidget::event() in case there is no focusWidget(). Reviewed-by: Thierry Task-number: 255468 --- src/gui/graphicsview/qgraphicsproxywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index 98fe51d..65f315c 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -840,7 +840,7 @@ bool QGraphicsProxyWidget::event(QEvent *event) // ### Qt 4.5: this code must also go into a reimplementation // of inputMethodEvent(). QWidget *focusWidget = d->widget->focusWidget(); - if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) + if (focusWidget && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) QApplication::sendEvent(focusWidget, event); break; } -- cgit v0.12