diff --git a/src/frontends/qt4/BulletsModule.cpp b/src/frontends/qt4/BulletsModule.cpp index ef21bd9723..a654160cd3 100644 --- a/src/frontends/qt4/BulletsModule.cpp +++ b/src/frontends/qt4/BulletsModule.cpp @@ -159,7 +159,8 @@ void BulletsModule::selectItem(int font, int character, bool select) return; QListWidget * lw = static_cast(bulletpaneSW->widget(font)); - lw->item(character)->setSelected(select); + if (lw && lw->item(character)) + lw->item(character)->setSelected(select); } diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index e9bdbaf522..93b782687e 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -3448,7 +3448,8 @@ void PrefShortcuts::shortcutOkPressed() if (item) { user_bind_.bind(&k, func); shortcutsTW->sortItems(0, Qt::AscendingOrder); - item->parent()->setExpanded(true); + if (item->parent()) + item->parent()->setExpanded(true); shortcutsTW->setCurrentItem(item); shortcutsTW->scrollToItem(item); } else {