diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-28 14:22:19 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-28 14:22:19 +0000 |
| commit | 807d2b93bf41682ec1093598f30abe74866e5994 (patch) | |
| tree | c7f12110361e6c44402af0a894dd116b99e68c94 /pokemodr/models/AbilityModel.cpp | |
| parent | 0fa52c1f61c457c9b68bec53bcce3af858e5eb44 (diff) | |
| download | sigen-807d2b93bf41682ec1093598f30abe74866e5994.tar.gz sigen-807d2b93bf41682ec1093598f30abe74866e5994.tar.xz sigen-807d2b93bf41682ec1093598f30abe74866e5994.zip | |
[FIX] De-inlined some methods
[FIX] More mounds checking
[FIX] RootModel inherits GroupModel
[FIX] Tree displays correctly (though segfaults on some expansion)
[FIX] Some more header cleanup
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@113 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/AbilityModel.cpp')
| -rw-r--r-- | pokemodr/models/AbilityModel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pokemodr/models/AbilityModel.cpp b/pokemodr/models/AbilityModel.cpp index 5d6bea06..58772fba 100644 --- a/pokemodr/models/AbilityModel.cpp +++ b/pokemodr/models/AbilityModel.cpp @@ -93,7 +93,9 @@ bool AbilityModel::setData(const QVariant& value, int role) BaseModel* AbilityModel::childItem(const int row) { - return m_effects[row]; + if (row < m_effects.size()) + return m_effects[row]; + return NULL; } int AbilityModel::indexNumber() const |
