aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/tile_set_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2018-03-13 12:53:51 +0100
committerGitHub2018-03-13 12:53:51 +0100
commit8b629bbcbe5da04fed8dd4828b79ca24c0f168e1 (patch)
tree0700355b0f4afd589eac8bb9a623ab2152b56ddf /editor/plugins/tile_set_editor_plugin.cpp
parentfcd81c9627fd9ec13be4ed3ff55d7213b2f7c3ba (diff)
parent86938a06aaad69669b482c589840961ce1509cdc (diff)
downloadgodot-8b629bbcbe5da04fed8dd4828b79ca24c0f168e1.tar.gz
godot-8b629bbcbe5da04fed8dd4828b79ca24c0f168e1.tar.zst
godot-8b629bbcbe5da04fed8dd4828b79ca24c0f168e1.zip
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index c964060f5..fb16c59dc 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -1826,6 +1826,8 @@ bool TileSetEditorHelper::_get(const StringName &p_name, Variant &r_ret) const {
if (selected_tile < 0 || tileset.is_null())
return false;
+ if (!tileset->has_tile(selected_tile))
+ return false;
String name = p_name.operator String();
bool v = false;
@@ -1850,6 +1852,7 @@ void TileSetEditorHelper::_get_property_list(List<PropertyInfo> *p_list) const {
TileSetEditorHelper::TileSetEditorHelper(TileSetEditor *p_tileset_editor) {
tileset_editor = p_tileset_editor;
+ selected_tile = -1;
}
void TileSetEditorPlugin::edit(Object *p_node) {