summaryrefslogtreecommitdiff
path: root/indra/llmath/lltreenode.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/lltreenode.h')
-rwxr-xr-x[-rw-r--r--]indra/llmath/lltreenode.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/llmath/lltreenode.h b/indra/llmath/lltreenode.h
index a462d1659e..0b479c4564 100644..100755
--- a/indra/llmath/lltreenode.h
+++ b/indra/llmath/lltreenode.h
@@ -28,6 +28,9 @@
#include "stdtypes.h"
#include "xform.h"
+#include "llpointer.h"
+#include "llrefcount.h"
+
#include <vector>
template <class T> class LLTreeNode;
@@ -54,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: