Merge pull request #44890 from KiritoAM/my-bug-fix

Fix for reselecting a TileMap node without first de-selecting it #44824
This commit is contained in:
Rémi Verschelde 2021-01-05 10:48:41 +01:00 committed by GitHub
commit f4d8733777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,10 @@
#include "scene/gui/split_container.h"
void TileMapEditor::_node_removed(Node *p_node) {
if (p_node == node) {
if (p_node == node && node) {
// Fixes #44824, which describes a situation where you can reselect a TileMap node without first de-selecting it when switching scenes.
node->disconnect("settings_changed", callable_mp(this, &TileMapEditor::_tileset_settings_changed));
node = nullptr;
}
}