aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/tile_set_editor_plugin.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson2018-03-02 12:25:28 +0700
committerPoommetee Ketson2018-03-02 17:14:55 +0700
commit86938a06aaad69669b482c589840961ce1509cdc (patch)
treeebdbb55e9cd125fc9b3b189fc903587dcbacc747 /editor/plugins/tile_set_editor_plugin.cpp
parent08cadc3d871f681ef1f951894345359a85ba190e (diff)
downloadgodot-86938a06aaad69669b482c589840961ce1509cdc.tar.gz
godot-86938a06aaad69669b482c589840961ce1509cdc.tar.zst
godot-86938a06aaad69669b482c589840961ce1509cdc.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 686ad566f..a72d30bea 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -1809,6 +1809,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;
@@ -1833,6 +1835,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) {