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:
parent
b0e7a1d4b4
commit
e3f1f5bd00
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue