[Bf-blender-cvs] [cb7cf52] master: Fix T42829: Cycles crash rendering when file is saved to specific location

Sergey Sharybin noreply at git.blender.org
Thu Dec 11 13:12:42 CET 2014


Commit: cb7cf523e5c000609f32a382e2c0fcc57f635a42
Author: Sergey Sharybin
Date:   Thu Dec 11 16:55:10 2014 +0500
Branches: master
https://developer.blender.org/rBcb7cf523e5c000609f32a382e2c0fcc57f635a42

Fix T42829: Cycles crash rendering when file is saved to specific location

The issue was caused by the way how RNA pointer was created for the bMain:
namely Cycles was using RNA_id_pointer_create to create the pointer, which
would then try to refine the poniter based on the ID type.

This is just wrong and worked so far just because of co-incident, with the
file path from the bug report first letters in the ID name happened to be
NT which corresponds to NodeTree, and for sure refining such pointer will
fail.

Simple solution -- use proper way to create RNA pointer for non-ID block.

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

M	intern/cycles/blender/blender_python.cpp

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

diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index dd45ae0..c48ec00 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -105,7 +105,7 @@ static PyObject *create_func(PyObject *self, PyObject *args)
 	BL::UserPreferences userpref(userprefptr);
 
 	PointerRNA dataptr;
-	RNA_id_pointer_create((ID*)PyLong_AsVoidPtr(pydata), &dataptr);
+	RNA_main_pointer_create((Main*)PyLong_AsVoidPtr(pydata), &dataptr);
 	BL::BlendData data(dataptr);
 
 	PointerRNA sceneptr;




More information about the Bf-blender-cvs mailing list