mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
* GuiSpellchecker.cpp:
- prevent null pointer (bug 6586) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33743 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
44bb53b57a
commit
c23fe9abfe
@ -108,11 +108,14 @@ bool GuiSpellchecker::eventFilter(QObject *obj, QEvent *event)
|
||||
if (obj == d->ui.suggestionsLW && event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *e = static_cast<QKeyEvent *> (event);
|
||||
if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
|
||||
on_suggestionsLW_itemClicked(d->ui.suggestionsLW->currentItem());
|
||||
on_replacePB_clicked();
|
||||
if (d->ui.suggestionsLW->currentItem()) {
|
||||
on_suggestionsLW_itemClicked(d->ui.suggestionsLW->currentItem());
|
||||
on_replacePB_clicked();
|
||||
}
|
||||
return true;
|
||||
} else if (e->key() == Qt::Key_Right) {
|
||||
on_suggestionsLW_itemClicked(d->ui.suggestionsLW->currentItem());
|
||||
if (d->ui.suggestionsLW->currentItem())
|
||||
on_suggestionsLW_itemClicked(d->ui.suggestionsLW->currentItem());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user