diff options
author | Richard Linden <none@none> | 2013-12-02 14:57:29 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-12-02 14:57:29 -0800 |
commit | 34ff2fc46ba8c623f0eab8fe1dccb5db327775a8 (patch) | |
tree | 7bc422dd969e1d18e9d83e52a9a6dcfa2bd6139f /indra/llmath/lltreenode.h | |
parent | 787ccaf297e81291469aaf269f563d862fb150a3 (diff) | |
parent | d8e92867162f8c4ff9489d8eefde53546e907dff (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: |