mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Guard against possible referencing null.
Those checks might not be needed, but it's not self obvious from the surrounding code. Because we already experienced crash from similar change (cf1c1c83eced
), 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 by24926b2e23
, fix104fdcc9be
not backported but now fixed by1c1c83eced
in 2.3. https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg216414.html
This commit is contained in:
parent
06acb7f806
commit
f7de009b17
@ -288,6 +288,7 @@ void BulletsModule::selectItem(int font, int character, bool select)
|
||||
return;
|
||||
|
||||
QListWidget * lw = static_cast<QListWidget *>(bulletpaneSW->widget(font));
|
||||
if (lw->item(character))
|
||||
lw->item(character)->setSelected(select);
|
||||
}
|
||||
|
||||
|
@ -3443,6 +3443,7 @@ void PrefShortcuts::shortcutOkPressed()
|
||||
if (item) {
|
||||
user_bind_.bind(&k, func);
|
||||
shortcutsTW->sortItems(0, Qt::AscendingOrder);
|
||||
if (item->parent())
|
||||
item->parent()->setExpanded(true);
|
||||
shortcutsTW->setCurrentItem(item);
|
||||
shortcutsTW->scrollToItem(item);
|
||||
|
Loading…
Reference in New Issue
Block a user