Fix crash with properties editor pinning.

This commit is contained in:
Brecht Van Lommel 2018-07-06 11:37:17 +02:00
parent 02f903d099
commit a364150c14
1 changed files with 3 additions and 0 deletions

View File

@ -204,6 +204,9 @@ static int buttons_context_path_object(ButsContextPath *path)
if (RNA_struct_is_a(ptr->type, &RNA_Object)) {
return 1;
}
if (!RNA_struct_is_a(ptr->type, &RNA_ViewLayer)) {
return 0;
}
ViewLayer *view_layer = ptr->data;
Object *ob = (view_layer->basact) ? view_layer->basact->object : NULL;