summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2019-02-27 01:47:55 +0100
committerGitHub <noreply@github.com>2019-02-27 01:47:55 +0100
commit9434db47dc4e1dd417ca2d29bfe28f12ce960f3d (patch)
treeafcea9919530d7414f876734d1c33c29f24bf78f /scene
parent270bbee018ff42f3e9fa400d960a6c63a4918f3a (diff)
parent464e1142c48da5d24fb9d2462b707b695f9b5adc (diff)
Merge pull request #26331 from hpvb/fix-26284
Don't crash on previewing an AtlasTexture without a region
Diffstat (limited to 'scene')
-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 430db59e44..1ce31374d9 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -426,6 +426,8 @@ ImageTexture::ImageTexture() {
texture = VisualServer::get_singleton()->texture_create();
storage = STORAGE_RAW;
lossy_storage_quality = 0.7;
+ image_stored = false;
+ format = Image::Format::FORMAT_L8;
}
ImageTexture::~ImageTexture() {
@@ -1514,6 +1516,7 @@ CubeMap::CubeMap() {
cubemap = VisualServer::get_singleton()->texture_create();
storage = STORAGE_RAW;
lossy_storage_quality = 0.7;
+ format = Image::Format::FORMAT_BPTC_RGBA;
}
CubeMap::~CubeMap() {