Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid row parameter check #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

thp
Copy link
Contributor

@thp thp commented Apr 14, 2015

Rebased version of #117

@@ -703,7 +710,10 @@ SeasidePerson *SeasideFilteredModel::personByRow(int row) const
if(row < 0 || row >= m_contactIds->size()) {
return NULL;
}
return personFromItem(SeasideCache::itemById(m_contactIds->at(row)));
if(m_allContactIds->contains(row)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a test for presence of the implicitly-converted value, not index validity. Also, should be m_contactIds, not m_allContactds (and index validity has already been tested...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @vranki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants