LocationCompleterView: Make sure focusProxy() is not null

See #2421
remotes/origin/falkon
David Rosca 9 years ago
parent 08274f5bbe
commit d3153355d7
  1. 6
      src/lib/navigation/completer/locationcompleterview.cpp

@ -193,7 +193,9 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
break;
} // switch (keyEvent->key())
(static_cast<QObject*>(focusProxy()))->event(keyEvent);
if (focusProxy()) {
(static_cast<QObject*>(focusProxy()))->event(keyEvent);
}
return true;
}
@ -233,7 +235,7 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
case QEvent::Move:
case QEvent::Resize: {
QWidget *w = qobject_cast<QWidget*>(object);
if (w && w->isWindow() && w == focusProxy()->window()) {
if (w && w->isWindow() && focusProxy() && w == focusProxy()->window()) {
close();
}
break;

Loading…
Cancel
Save