mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibGUI: Require a model pointer for ModelIndex::is_valid()
This was not an issue anywhere in practice, but let's make it part of the definition of a valid model index.
This commit is contained in:
parent
a66e55ec64
commit
d396766058
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class ModelIndex {
|
|||
public:
|
||||
ModelIndex() { }
|
||||
|
||||
bool is_valid() const { return m_row != -1 && m_column != -1; }
|
||||
bool is_valid() const { return m_model && m_row != -1 && m_column != -1; }
|
||||
int row() const { return m_row; }
|
||||
int column() const { return m_column; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue