summaryrefslogtreecommitdiffstats
path: root/smtreeitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'smtreeitem.cpp')
-rw-r--r--smtreeitem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/smtreeitem.cpp b/smtreeitem.cpp
index a13e76a..5584319 100644
--- a/smtreeitem.cpp
+++ b/smtreeitem.cpp
@@ -36,7 +36,10 @@ void SmTreeItem::appendChild(SmTreeItem *child){
}
SmTreeItem *SmTreeItem::child(int row) const{
- return mChildren.at(row);
+ if(row > -1 && row < mChildren.count()){
+ return mChildren.at(row);
+ }
+ return 0;
}
int SmTreeItem::childCount() const{