mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:57:35 +00:00
LibGUI: Fix bogus return value on error in FilteringProxyModel::data()
Return an empty GUI::Variant on indexing error.
This commit is contained in:
parent
e12d2f9a04
commit
af532b22c8
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ Variant FilteringProxyModel::data(ModelIndex const& index, ModelRole role) const
|
|||
return {};
|
||||
|
||||
if ((size_t)index.row() > m_matching_indices.size() || index.row() < 0)
|
||||
return 0;
|
||||
return {};
|
||||
|
||||
return m_matching_indices[index.row()].data(role);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue