[Bf-blender-cvs] [a364150c14d] blender2.8: Fix crash with properties editor pinning.

Brecht Van Lommel noreply at git.blender.org
Fri Jul 6 14:33:23 CEST 2018


Commit: a364150c14dbe8676b65cd45b54f43a581c3b765
Author: Brecht Van Lommel
Date:   Fri Jul 6 11:37:17 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa364150c14dbe8676b65cd45b54f43a581c3b765

Fix crash with properties editor pinning.

===================================================================

M	source/blender/editors/space_buttons/buttons_context.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list