mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-13 17:48:43 +01:00
RMG: re-add nullptr check in RomBrowserWidget::getCurrentData()
This commit is contained in:
1 parent
5f10f39ac0
commit
006a7c8eff
1 file changed
+5
@@ -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