diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-13 10:58:25 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-13 10:58:25 +0200 |
commit | ecefae22cb384b365bc32f17c3a39cd2fa9ff8ab (patch) | |
tree | f364abde4a2119aa94bb1f5c715d7a96dd8da76b | |
parent | 5c1ef35defa9351118195b364eba18f9defc2d14 (diff) | |
parent | 7fc075d235df742728c04b19690ba8485c9d8bec (diff) |
Merge pull request #65624 from KoBeWi/help_I'm_stuck
Prevent infinite loops in editor help search
-rw-r--r-- | editor/editor_help_search.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 129ad4d33b..7e7d7ca418 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -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)) { @@ -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; @@ -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; } |