mirror of
https://github.com/godotengine/godot
synced 2024-09-05 17:40:22 +00:00
Merge pull request #93255 from jsjtxietian/atlas-default
Prevent generating preview for zero sized texture
This commit is contained in:
commit
2a470143ef
|
@ -97,6 +97,10 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from,
|
|||
return Ref<Texture2D>();
|
||||
}
|
||||
|
||||
if (!atex->get_region().has_area()) {
|
||||
return Ref<Texture2D>();
|
||||
}
|
||||
|
||||
img = atlas->get_region(atex->get_region());
|
||||
} else {
|
||||
Ref<Texture2D> tex = p_from;
|
||||
|
|
Loading…
Reference in a new issue