Python bug fix for #875

* Blender.Object.GetSelected() would crash when no 3d-view has been
  initialized at startup. Fixed.
This commit is contained in:
2004-01-25 17:42:40 +00:00
parent 7021c88b4d
commit 8eac9cef15

View File

@@ -439,6 +439,12 @@ static PyObject *M_Object_GetSelected (PyObject *self, PyObject *args)
PyObject * list;
Base * base_iter;
if (G.vd == NULL)
{
// No 3d view has been initialized yet, simply return None
Py_INCREF (Py_None);
return Py_None;
}
list = PyList_New (0);
if ((G.scene->basact) &&
((G.scene->basact->flag & SELECT) &&