diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-04-07 14:12:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-04-07 14:12:21 +0400 |
commit | 66e74e6057ff4266fb3a6b19268b4c114c7cfe89 (patch) | |
tree | 68fae379d073a74c3f1e84c65815b48bc82aca44 /source/blender/python | |
parent | 391191a7e3a38e80250bd67fce9d588648f2eb4d (diff) |
annoyance with python api, Blender.Library.Datablocks should always return an empty list, rather then None when there is no datablocks.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/api2_2x/Library.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c index 12e2ce3055b..6cebd8c2be3 100644 --- a/source/blender/python/api2_2x/Library.c +++ b/source/blender/python/api2_2x/Library.c @@ -279,10 +279,11 @@ static PyObject *M_Library_Datablocks( PyObject * self, PyObject * value ) counter++; } BLI_linklist_free( names, free ); /* free linklist *and* each node's data */ - return list; + } else { + list = PyList_New( 0 ); } - Py_RETURN_NONE; + return list; } /** |