We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5045d54 + c7ca36b commit ef1153bCopy full SHA for ef1153b
editor/editor_inspector.cpp
@@ -3941,8 +3941,9 @@ void EditorInspector::update_tree() {
3941
}
3942
3943
// Clean up empty sections.
3944
- for (List<EditorInspectorSection *>::Element *I = sections.back(); I; I = I->prev()) {
+ for (List<EditorInspectorSection *>::Element *I = sections.back(); I;) {
3945
EditorInspectorSection *section = I->get();
3946
+ I = I->prev(); // Note: Advance before erasing element.
3947
if (section->get_vbox()->get_child_count() == 0) {
3948
sections.erase(section);
3949
vbox_per_path[main_vbox].erase(section->get_section());
0 commit comments