Fix implicit conversion from pointer to bool

Error in 9b6c5268bc. Also move variable declaration to where it's
used to reduce confusion.
This commit is contained in:
Hans Goudey 2020-09-30 12:31:53 -05:00
parent 8cbd09672d
commit 2cc913d7d9
Notes: blender-bot 2023-02-14 07:47:59 +01:00
Referenced by issue #81424, Runtime error in Video Editing when navigating to a folder
1 changed files with 2 additions and 4 deletions

View File

@ -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;