Merge pull request #53258 from boruok/3.x-fix-atlas-texture-get_data-crash

This commit is contained in:
Rémi Verschelde 2021-09-30 18:31:44 +02:00 committed by GitHub
commit 8d0b2edfc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -960,7 +960,7 @@ bool AtlasTexture::has_filter_clip() const {
}
Ref<Image> AtlasTexture::get_data() const {
if (!atlas.is_valid()) {
if (!atlas.is_valid() || !atlas->get_data().is_valid()) {
return Ref<Image>();
}