Skip to content

Commit

Permalink
Merge pull request #6559 from spycrab/qt_crashes
Browse files Browse the repository at this point in the history
Qt/PatchesWidget: Fix segfault
  • Loading branch information
lioncash committed Mar 29, 2018
2 parents fc99b21 + 55d9df3 commit c3398c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt2/Config/PatchesWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c3398c9

Please sign in to comment.