summaryrefslogtreecommitdiff
path: root/indra/llmath/lltreenode.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/lltreenode.h')
-rwxr-xr-xindra/llmath/lltreenode.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llmath/lltreenode.h b/indra/llmath/lltreenode.h
index c66bc26176..0b479c4564 100755
--- a/indra/llmath/lltreenode.h
+++ b/indra/llmath/lltreenode.h
@@ -57,7 +57,14 @@ public:
virtual bool remove(T* data);
virtual void notifyRemoval(T* data);
virtual U32 getListenerCount() { return mListeners.size(); }
- virtual LLTreeListener<T>* getListener(U32 index) const { return mListeners[index]; }
+ virtual LLTreeListener<T>* getListener(U32 index) const
+ {
+ if(index < mListeners.size())
+ {
+ return mListeners[index];
+ }
+ return NULL;
+ }
virtual void addListener(LLTreeListener<T>* listener) { mListeners.push_back(listener); }
protected: