mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Qt/PatchesWidget: Fix segfault
This commit is contained in:
@@ -169,7 +169,8 @@ void PatchesWidget::Update()
|
||||
void PatchesWidget::UpdateActions()
|
||||
{
|
||||
bool selected = !m_list->selectedItems().isEmpty();
|
||||
auto* item = m_list->selectedItems()[0];
|
||||
|
||||
auto* item = selected ? m_list->selectedItems()[0] : nullptr;
|
||||
|
||||
bool user_defined = selected ? item->data(Qt::UserRole).toBool() : true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user