diff options
| author | simon <none@none> | 2014-05-07 15:28:13 -0700 |
|---|---|---|
| committer | simon <none@none> | 2014-05-07 15:28:13 -0700 |
| commit | a5568f942b449e48cad71e92acd67eaa22dd5e5d (patch) | |
| tree | f266b99c9663fda8001cbde48aa5a6b1b9d7db68 /indra/llmath/lltreenode.h | |
| parent | 80a134ffcc68b277c10cc79dc9c7ca073148b41e (diff) | |
| parent | dc4c184696b308b8f60fa1dd751b35e22bd47d62 (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: |
