Commit: e3f1f5bd006a206f81aa9bb20e833e8fc0d9728a
Author: Sybren A. Stüvel
Date:   Wed Nov 6 11:53:23 2019 +0100
Branches: master
https://developer.blender.org/rBe3f1f5bd006a206f81aa9bb20e833e8fc0d9728a

Fix crash when adding Scene variable to a driver

When a Scene variable is added to a driver, and the RNA path is still NULL,
it no longer crashes Blender.

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

M       source/blender/depsgraph/intern/builder/deg_builder_relations.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc 
b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index f68b03034a9..db7c1e5ceae 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -146,7 +146,8 @@ bool python_driver_exression_depends_on_time(const char 
*expression)
 
 bool driver_target_depends_on_time(const DriverTarget *target)
 {
-  if (target->idtype == ID_SCE && STREQ(target->rna_path, "frame_current")) {
+  if (target->idtype == ID_SCE &&
+      (target->rna_path != NULL && STREQ(target->rna_path, "frame_current"))) {
     return true;
   }
   return false;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to