diff options
author | Richard Linden <none@none> | 2014-03-12 12:48:43 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2014-03-12 12:48:43 -0700 |
commit | 5b846ed2a6dce6c5801aa74d0f36a1c7525fbcba (patch) | |
tree | 438dd649dbcc0584709251c6926a476b0db02f85 /indra/llmath/lltreenode.h | |
parent | cb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff) | |
parent | 5f513242890068f569df7e50a5ac0ba3bdd23f05 (diff) |
merge with release
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: |