summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-08 15:58:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-08 15:58:52 -0300
commit555fb3a31749b19829588391794bfc57364e070a (patch)
treed6cf95364b5bd4a6e0a786fe7611966e821492d8 /scene/resources
parentd403b4086c514647bba7620591061b7de7dfaf4b (diff)
Effectively ensure that surface materials are the right size when setting them, fixes #23596
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/primitive_meshes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 28af3d3220..4906ceb2eb 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -102,6 +102,9 @@ void PrimitiveMesh::_request_update() {
}
int PrimitiveMesh::get_surface_count() const {
+ if (pending_request) {
+ _update();
+ }
return 1;
}