[Bf-blender-cvs] [622ef08] master: Freestyle: Fix for a crash during access to Scene properties from within Python.

Tamito Kajiyama noreply at git.blender.org
Tue Aug 12 03:17:47 CEST 2014


Commit: 622ef089f93629a7f9e67db6e47ab5cf05291b66
Author: Tamito Kajiyama
Date:   Sat Jul 19 15:35:11 2014 +0900
Branches: master
https://developer.blender.org/rB622ef089f93629a7f9e67db6e47ab5cf05291b66

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

===================================================================

M	source/blender/freestyle/intern/python/BPy_Freestyle.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 2cfd365..5b8d50e 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -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);
 }




More information about the Bf-blender-cvs mailing list