mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-07-11 01:24:01 +02:00
RMG: re-add nullptr check in RomBrowserWidget::getCurrentData()
This commit is contained in:
@@ -471,6 +471,11 @@ bool RomBrowserWidget::getCurrentData(RomBrowserModelData& data)
|
||||
QModelIndex index = model.second->mapToSource(view->currentIndex());
|
||||
QStandardItem* item = model.first->item(index.row(), 0);
|
||||
|
||||
if (item == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
data = item->data().value<RomBrowserModelData>();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user