[Bf-blender-cvs] [55c021a] blender-v2.75-release: BGE: dissallow calling reverse on internal clists
Campbell Barton
noreply at git.blender.org
Mon Jun 29 16:17:50 CEST 2015
Commit: 55c021a5a72ee19df63cbe4e329e29b7400145f2
Author: Campbell Barton
Date: Sat Jun 20 20:02:16 2015 +1000
Branches: blender-v2.75-release
https://developer.blender.org/rB55c021a5a72ee19df63cbe4e329e29b7400145f2
BGE: dissallow calling reverse on internal clists
===================================================================
M source/gameengine/Expressions/ListValue.cpp
===================================================================
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 5e0eb92..58e5710 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;
}
More information about the Bf-blender-cvs
mailing list