diff options
author | simon <none@none> | 2014-05-07 13:19:05 -0700 |
---|---|---|
committer | simon <none@none> | 2014-05-07 13:19:05 -0700 |
commit | dc4c184696b308b8f60fa1dd751b35e22bd47d62 (patch) | |
tree | 1606d992f1cce6fe19572042c456725eb95d7066 /indra/llmath/lltreenode.h | |
parent | 883467a3cc421fca68a25589114e0e3f0538ff0e (diff) | |
parent | 250db74bf9325acdc1169f6c13d297e7fe44b753 (diff) |
Merge downstream version 3.7.8 code
Diffstat (limited to 'indra/llmath/lltreenode.h')
-rwxr-xr-x | indra/llmath/lltreenode.h | 9 |
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: |