mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 14:24:54 +00:00
Merge pull request #6559 from spycrab/qt_crashes
Qt/PatchesWidget: Fix segfault
This commit is contained in:
commit
c3398c9e2c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue