mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix heap-use-after-free error in TileMapLayerEditor
This commit is contained in:
parent
b2f425fe68
commit
bb6a1cb5a8
1 changed files with 7 additions and 1 deletions
|
|
@ -3672,10 +3672,16 @@ void TileMapLayerEditor::_node_change(Node *p_node) {
|
||||||
|
|
||||||
void TileMapLayerEditor::_notification(int p_what) {
|
void TileMapLayerEditor::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_READY: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
get_tree()->connect("node_added", callable_mp(this, &TileMapLayerEditor::_node_change));
|
get_tree()->connect("node_added", callable_mp(this, &TileMapLayerEditor::_node_change));
|
||||||
get_tree()->connect("node_removed", callable_mp(this, &TileMapLayerEditor::_node_change));
|
get_tree()->connect("node_removed", callable_mp(this, &TileMapLayerEditor::_node_change));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_EXIT_TREE: {
|
||||||
|
get_tree()->disconnect("node_added", callable_mp(this, &TileMapLayerEditor::_node_change));
|
||||||
|
get_tree()->disconnect("node_removed", callable_mp(this, &TileMapLayerEditor::_node_change));
|
||||||
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_THEME_CHANGED: {
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
missing_tile_texture = get_editor_theme_icon(SNAME("StatusWarning"));
|
missing_tile_texture = get_editor_theme_icon(SNAME("StatusWarning"));
|
||||||
warning_pattern_texture = get_editor_theme_icon(SNAME("WarningPattern"));
|
warning_pattern_texture = get_editor_theme_icon(SNAME("WarningPattern"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue