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:
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user