Don't try to emit focusObjectChanged if window pointer is zero
Task-number: QTBUG-27414 Change-Id: I75ad662e0a66d61b49d55d084f29cefc98221b7f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
fb029eeac6
commit
187b61d879
@ -5993,8 +5993,10 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
||||
f->d_func()->updateFocusChild();
|
||||
}
|
||||
|
||||
if (QTLWExtra *extra = f->window()->d_func()->maybeTopData())
|
||||
emit extra->window->focusObjectChanged(f);
|
||||
if (QTLWExtra *extra = f->window()->d_func()->maybeTopData()) {
|
||||
if (extra->window)
|
||||
emit extra->window->focusObjectChanged(f);
|
||||
}
|
||||
}
|
||||
|
||||
// updates focus_child on parent widgets to point into this widget
|
||||
|
Loading…
Reference in New Issue
Block a user