Cleanup: use more explicit check for buttons context
This commit is contained in:
parent
427c75e4c2
commit
a287153ee4
Notes:
blender-bot
2023-02-14 02:30:11 +01:00
Referenced by issue #68705, Crash: Changing any editor to the properties crashes Blender
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue