mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
Fix crash on exit where TileSet calls destroyed TileSetAtlasSourceEditor
Removes signal from TileSet on destroying TileSetAtlasSourceEditor, to prevent TileSet calling function in destroyed TileSetAtlasSourceEditor.
This commit is contained in:
parent
0308422f46
commit
fa7be20ee1
@ -2655,6 +2655,12 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
||||
TileSetAtlasSourceEditor::~TileSetAtlasSourceEditor() {
|
||||
memdelete(tile_proxy_object);
|
||||
memdelete(atlas_source_proxy_object);
|
||||
|
||||
// Remove listener for old objects, so the TileSet doesn't
|
||||
// try to call the destroyed TileSetAtlasSourceEditor.
|
||||
if (tile_set.is_valid()) {
|
||||
tile_set->disconnect_changed(callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed));
|
||||
}
|
||||
}
|
||||
|
||||
////// EditorPropertyTilePolygon //////
|
||||
|
Loading…
Reference in New Issue
Block a user