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.
This commit is contained in:
Sybren A. Stüvel 2019-11-06 11:53:23 +01:00
parent b0e7a1d4b4
commit e3f1f5bd00
1 changed files with 2 additions and 1 deletions

View File

@ -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;