diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-16 23:34:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-16 23:34:38 +0400 |
commit | e6a43441b91c9a462acf2280ff30c4c1f3167829 (patch) | |
tree | 71f34046b896513312f2b27db6f45a7117a7f394 /source/blender/compositor/intern | |
parent | 42d0e34fac5de0aae6918895b5a182a8a57797e8 (diff) |
disable GaussianAlpha from attempting to get a non existing socket - and add an assert if this is attempted.
Diffstat (limited to 'source/blender/compositor/intern')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeBase.cpp | 6 | ||||
-rw-r--r-- | source/blender/compositor/intern/COM_NodeBase.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/compositor/intern/COM_NodeBase.cpp b/source/blender/compositor/intern/COM_NodeBase.cpp index 42946d7315e..26e86eed9e0 100644 --- a/source/blender/compositor/intern/COM_NodeBase.cpp +++ b/source/blender/compositor/intern/COM_NodeBase.cpp @@ -81,12 +81,14 @@ const bool NodeBase::isInputNode() const return this->inputsockets.size() == 0; } -OutputSocket *NodeBase::getOutputSocket(int index) +OutputSocket *NodeBase::getOutputSocket(unsigned int index) { + BLI_assert(index < this->outputsockets.size()); return this->outputsockets[index]; } -InputSocket *NodeBase::getInputSocket(int index) +InputSocket *NodeBase::getInputSocket(unsigned int index) { + BLI_assert(index < this->inputsockets.size()); return this->inputsockets[index]; } diff --git a/source/blender/compositor/intern/COM_NodeBase.h b/source/blender/compositor/intern/COM_NodeBase.h index 5e3a4fa5531..54f80926b84 100644 --- a/source/blender/compositor/intern/COM_NodeBase.h +++ b/source/blender/compositor/intern/COM_NodeBase.h @@ -103,7 +103,7 @@ public: * @param index * the index of the needed outputsocket */ - OutputSocket *getOutputSocket(const int index); + OutputSocket *getOutputSocket(const unsigned int index); /** * get the reference to the first outputsocket @@ -117,7 +117,7 @@ public: * @param index * the index of the needed inputsocket */ - InputSocket *getInputSocket(const int index); + InputSocket *getInputSocket(const unsigned int index); virtual bool isStatic() const { return false; } |