mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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
Notes:
sideshowbarker
2024-07-19 03:32:56 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d3967660588
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…
Reference in a new issue