Skip to content

Commit

Permalink
Merge pull request godotengine#65624 from KoBeWi/help_I'm_stuck
Browse files Browse the repository at this point in the history
Prevent infinite loops in editor help search
  • Loading branch information
akien-mga committed Sep 13, 2022
2 parents 5c1ef35 + 7fc075d commit ecefae2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions editor/editor_help_search.cpp
Expand Up @@ -326,6 +326,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes_init() {
bool EditorHelpSearch::Runner::_phase_match_classes() {
DocData::ClassDoc &class_doc = iterator_doc->value;
if (class_doc.name.is_empty()) {
++iterator_doc;
return false;
}
if (!_is_class_disabled_by_feature_profile(class_doc.name)) {
Expand Down Expand Up @@ -432,7 +433,7 @@ bool EditorHelpSearch::Runner::_phase_class_items_init() {

bool EditorHelpSearch::Runner::_phase_class_items() {
if (!iterator_match) {
return false;
return true;
}
ClassMatch &match = iterator_match->value;

Expand All @@ -459,10 +460,8 @@ bool EditorHelpSearch::Runner::_phase_member_items_init() {
bool EditorHelpSearch::Runner::_phase_member_items() {
ClassMatch &match = iterator_match->value;

if (!match.doc) {
return false;
}
if (match.doc->name.is_empty()) {
if (!match.doc || match.doc->name.is_empty()) {
++iterator_match;
return false;
}

Expand Down

0 comments on commit ecefae2

Please sign in to comment.