diff options
author | Hans Goudey <h.goudey@me.com> | 2020-09-30 20:31:53 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-09-30 20:31:53 +0300 |
commit | 2cc913d7d9142ad126c5c3c35e93c92cc11d8214 (patch) | |
tree | 31e5f64227d711da956bcc70a7a56bec534b93aa /source/blender/editors/interface/interface.c | |
parent | 8cbd09672d880c4f9774b6b0d1990fc927ae0853 (diff) |
Fix implicit conversion from pointer to bool
Error in 9b6c5268bc20. Also move variable declaration to where it's
used to reduce confusion.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 68e02ba1e55..25354c30c62 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1322,14 +1322,11 @@ static bool ui_but_event_property_operator_string(const bContext *C, opnames_len = ARRAY_SIZE(ctx_enum_opnames); } } - - bool found = false; - /* Don't use the button again. */ but = NULL; if (prop == NULL) { - return NULL; + return false; } /* this version is only for finding hotkeys for properties @@ -1414,6 +1411,7 @@ static bool ui_but_event_property_operator_string(const bContext *C, } /* we have a datapath! */ + bool found = false; if (data_path || (prop_enum_value_ok && prop_enum_value_id)) { /* create a property to host the "datapath" property we're sending to the operators */ IDProperty *prop_path; |