You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #89801 from timothyqiu/lost-group
Fix heap-use-after-free when converting scene group to global
This commit is contained in:
@@ -157,10 +157,14 @@ void GroupsEditor::_update_groups() {
|
|||||||
|
|
||||||
_load_scene_groups(scene_root_node);
|
_load_scene_groups(scene_root_node);
|
||||||
|
|
||||||
for (const KeyValue<StringName, bool> &E : scene_groups) {
|
for (HashMap<StringName, bool>::Iterator E = scene_groups.begin(); E;) {
|
||||||
if (global_groups.has(E.key)) {
|
HashMap<StringName, bool>::Iterator next = E;
|
||||||
scene_groups.erase(E.key);
|
++next;
|
||||||
|
|
||||||
|
if (global_groups.has(E->key)) {
|
||||||
|
scene_groups.erase(E->key);
|
||||||
}
|
}
|
||||||
|
E = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
updating_groups = false;
|
updating_groups = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user