Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-11-06 13:53:23 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-11-06 13:53:23 +0300
commite3f1f5bd006a206f81aa9bb20e833e8fc0d9728a (patch)
treea0b28ca4b923095a6b7d127c05584b661c760a4f /source/blender/depsgraph
parentb0e7a1d4b492ccb825d37547fa722535cb475108 (diff)
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.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc3
1 files changed, 2 insertions, 1 deletions
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;