summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-21 10:09:00 +0100
committerGitHub <noreply@github.com>2018-12-21 10:09:00 +0100
commitf09956c86c15b0c119c2b8e66d8f7a7281cce36a (patch)
tree74e183f8cf8f74819084402d198a8fb046780be4
parent0b774d47e65538007e744aaa19bab0b4e19eaf6b (diff)
parentdaf54133c258874acf3342d1907174a9923ebed0 (diff)
Merge pull request #24513 from YeldhamDev/fix_tileset_editor_draw
Fix small drawing error in TileSet editor
-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 d6357f7c3b..e5551d385b 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;