diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 1898ecba68..0ed0b0ec3f 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -356,6 +356,9 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) } } + if (!child) + return 0; + QWidget *oldChild = child; uint focus_flag = qt_tab_all_widgets() ? Qt::TabFocus : Qt::StrongFocus; do {