summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 16b4ed31df..f0e3979f13 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -207,6 +207,9 @@ void ImageTexture::set_flags(uint32_t p_flags) {
flags=p_flags|cube; */
flags = p_flags;
+ if (w == 0 || h == 0) {
+ return; //uninitialized, do not set to texture
+ }
VisualServer::get_singleton()->texture_set_flags(texture, p_flags);
}