diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-06 12:37:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-06 15:19:11 +0300 |
commit | a364150c14dbe8676b65cd45b54f43a581c3b765 (patch) | |
tree | bf661ab93034f78e6e3c71ff3c21d3bb2c2943a0 /source | |
parent | 02f903d0996a785b5e167b26907ff53e967037d7 (diff) |
Fix crash with properties editor pinning.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 19a55c2e3cd..4c6de3ec012 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -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; |