Freestyle: Fix for a crash during access to Scene properties from within Python.

This commit is contained in:
2014-07-19 15:35:11 +09:00
parent 4fc2b8dcc6
commit 622ef089f9

View File

@@ -60,6 +60,7 @@ extern "C" {
#include "FRS_freestyle.h"
#include "RNA_access.h"
#include "DNA_scene_types.h"
#include "bpy_rna.h" /* pyrna_struct_CreatePyObject() */
static char Freestyle_getCurrentScene___doc__[] =
@@ -77,7 +78,7 @@ static PyObject *Freestyle_getCurrentScene(PyObject *self)
return NULL;
}
PointerRNA ptr_scene;
RNA_pointer_create(NULL, &RNA_Scene, freestyle_scene, &ptr_scene);
RNA_pointer_create(&freestyle_scene->id, &RNA_Scene, freestyle_scene, &ptr_scene);
return pyrna_struct_CreatePyObject(&ptr_scene);
}