You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix crash when drawing invalid tiles
This commit is contained in:
@@ -884,6 +884,9 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
|
||||
if (atlas_source) {
|
||||
// Get tile data.
|
||||
TileData *tile_data = atlas_source->get_tile_data(E.value.get_atlas_coords(), E.value.alternative_tile);
|
||||
if (!tile_data) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Compute the offset
|
||||
Rect2i source_rect = atlas_source->get_tile_texture_region(E.value.get_atlas_coords());
|
||||
|
||||
Reference in New Issue
Block a user