mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Prevent generating preview for zero sized texture
This commit is contained in:
parent
475248d99d
commit
3027b49943
@ -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 New Issue
Block a user