Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-06-20 13:02:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-06-29 16:46:30 +0300
commit55c021a5a72ee19df63cbe4e329e29b7400145f2 (patch)
tree3baa8af0430f79d2140a79e1cd09731173c4aef2
parent5bbd97600623c990476120588d15ae5cb6c19010 (diff)
BGE: dissallow calling reverse on internal clists
-rw-r--r--source/gameengine/Expressions/ListValue.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 5e0eb92eb58..58e571042d8 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -583,7 +583,8 @@ PyObject *CListValue::Pyappend(PyObject *value)
return NULL;
if (!BGE_PROXY_PYOWNS(m_proxy)) {
- PyErr_SetString(PyExc_TypeError, "CList.append(i): this CValueList is used internally for the game engine and can't be modified");
+ PyErr_SetString(PyExc_TypeError,
+ "CList.append(i): internal values can't be modified");
return NULL;
}
@@ -594,6 +595,12 @@ PyObject *CListValue::Pyappend(PyObject *value)
PyObject *CListValue::Pyreverse()
{
+ if (!BGE_PROXY_PYOWNS(m_proxy)) {
+ PyErr_SetString(PyExc_TypeError,
+ "CList.reverse(): internal values can't be modified");
+ return NULL;
+ }
+
std::reverse(m_pValueArray.begin(),m_pValueArray.end());
Py_RETURN_NONE;
}