Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-04-25 12:51:22 +0300
committerJacques Lucke <jacques@blender.org>2022-04-25 12:51:34 +0300
commita2d32960b4de78f545ce52e92185eefd3c93fde1 (patch)
treed07f2c21566f223bd62731ee06e78984caaa17f5 /source/blender/blenlib/intern
parentc63d64a2ce3e49188628d54450b751fd764b8a67 (diff)
BLI: optimize constructing new virtual array
Differential Revision: https://developer.blender.org/D14745
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/generic_virtual_array.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/generic_virtual_array.cc b/source/blender/blenlib/intern/generic_virtual_array.cc
index e1a150c3f08..a3a17952a97 100644
--- a/source/blender/blenlib/intern/generic_virtual_array.cc
+++ b/source/blender/blenlib/intern/generic_virtual_array.cc
@@ -643,6 +643,9 @@ void GVArrayCommon::get_internal_single_to_uninitialized(void *r_value) const
const GVArrayImpl *GVArrayCommon::impl_from_storage() const
{
+ if (!storage_.has_value()) {
+ return nullptr;
+ }
return storage_.extra_info().get_varray(storage_.get());
}