diff --git a/rtile_set.cpp b/rtile_set.cpp index ae576bb..436df58 100644 --- a/rtile_set.cpp +++ b/rtile_set.cpp @@ -4539,6 +4539,7 @@ void RTileSetAtlasSource::_update_padded_texture() { Ref image; image.instance(); image->create(size.x, size.y, false, Image::FORMAT_RGBA8); + image->lock(); for (const Map::Element *kv = tiles.front(); kv; kv = kv->next()) { for (int frame = 0; frame < (int)kv->value().animation_frames_durations.size(); frame++) { @@ -4568,6 +4569,8 @@ void RTileSetAtlasSource::_update_padded_texture() { } } + image->unlock(); + if (!padded_texture.is_valid()) { padded_texture.instance(); }