Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-10 05:51:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-10 05:51:04 +0300
commita287153ee49741e23dbee273a6ad7425dab94de4 (patch)
treeb9f5bd6b7ec8059f37fc0073a3e40387d7239c88 /source/blender/editors/space_buttons
parent427c75e4c20b38611d213ca26681a5691be5d6a6 (diff)
Cleanup: use more explicit check for buttons context
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 577f7a7af8a..fde8b8f85f8 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -785,8 +785,11 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
SpaceProperties *sbuts = CTX_wm_space_properties(C);
ButsContextPath *path = sbuts ? sbuts->path : NULL;
- /* A zero sized path will be set for 'BCONTEXT_TOOL'. */
- if (!path || !path->len) {
+ if (sbuts->mainb == BCONTEXT_TOOL) {
+ return 0;
+ }
+
+ if (!path) {
return 0;
}