diff --git a/src/frontends/qt/BulletsModule.cpp b/src/frontends/qt/BulletsModule.cpp index fcd14e3159..3d6ad9cc41 100644 --- a/src/frontends/qt/BulletsModule.cpp +++ b/src/frontends/qt/BulletsModule.cpp @@ -288,7 +288,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->item(character)) + lw->item(character)->setSelected(select); } diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index 7c7a969b17..c1be9b80b2 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -3443,7 +3443,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 {