diff options
Diffstat (limited to 'source/blender/blenkernel/intern/context.c')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index be81c70f261..719ae7357b4 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -234,9 +234,8 @@ struct bContextDataResult { static void *ctx_wm_python_context_get(const bContext *C, const char *member, void *fall_through) { #ifdef WITH_PYTHON - bContextDataResult result; - - if (C && CTX_py_dict_get(C)) { + if (UNLIKELY(C && CTX_py_dict_get(C))) { + bContextDataResult result; memset(&result, 0, sizeof(bContextDataResult)); BPY_context_member_get((bContext *)C, member, &result); if (result.ptr.data) |