summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-12-20 19:52:56 -0200
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-12-20 19:52:56 -0200
commitdaf54133c258874acf3342d1907174a9923ebed0 (patch)
treea0b3ce2e354c1decfbea78d1f31a9b5fdff5b7cb /editor/plugins
parentaa819a85381dc256e4e1a59dd62d5da84346e3ea (diff)
Fix small drawing error in TileSet editor
Diffstat (limited to 'editor/plugins')
-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 cab9a4297d..feba757a9c 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -874,6 +874,9 @@ void TileSetEditor::_on_workspace_draw() {
draw_edited_region_subdivision();
} else {
int t_id = get_current_tile();
+ if (t_id < 0)
+ return;
+
Rect2i region;
if (draw_edited_region)
region = edited_region;