Those checks might not be needed, but it's not self obvious from
the surrounding code. Because we already experienced crash from
similar change (cf
1c1c83eced96), let's be prudent here.
If you know that these pointers can't be null from broader context
feel free to remove the guards.
Introduced by
24926b2e2399, fix
104fdcc9be40df1 not backported
but now fixed by
1c1c83eced96 in 2.3.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg216414.html
return;
QListWidget * lw = static_cast<QListWidget *>(bulletpaneSW->widget(font));
- lw->item(character)->setSelected(select);
+ if (lw->item(character))
+ lw->item(character)->setSelected(select);
}
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 {