Commit: f9a95ae9843f9e739ad81527062fae9bc917796f
Author: Lukas Tönne
Date:   Sat Jun 14 08:28:31 2014 +0200
https://developer.blender.org/rBf9a95ae9843f9e739ad81527062fae9bc917796f

Fix for node lookup from RNA pointers, this has to ensure the pointer
is non-NULL before passing it to RNA functions.

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

M       source/blender/depsgraph/intern/depsgraph.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph.cpp 
b/source/blender/depsgraph/intern/depsgraph.cpp
index 5e7cee9..d0b3fbb 100644
--- a/source/blender/depsgraph/intern/depsgraph.cpp
+++ b/source/blender/depsgraph/intern/depsgraph.cpp
@@ -63,6 +63,9 @@ Depsgraph::~Depsgraph()
 static bool pointer_to_id_node_criteria(const PointerRNA *ptr, const 
PropertyRNA *prop,
                                         ID **id)
 {
+       if (!ptr->type)
+               return false;
+       
        if (!prop) {
                if (RNA_struct_is_ID(ptr->type)) {
                        *id = (ID *)ptr->data;
@@ -77,6 +80,9 @@ static bool pointer_to_component_node_criteria(const 
PointerRNA *ptr, const Prop
                                                ID **id,
                                                eDepsNode_Type *type, string 
*subdata)
 {
+       if (!ptr->type)
+               return false;
+       
        /* set default values for returns */
        *id        = (ID *)ptr->id.data;        /* for obvious reasons... */
        *subdata   = "";                        /* default to no subdata (e.g. 
bone) name lookup in most cases */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to