summaryrefslogtreecommitdiff
path: root/core/packed_data_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/packed_data_container.cpp')
-rw-r--r--core/packed_data_container.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index 003e7e7428..7afaf7f0f1 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -137,6 +137,7 @@ uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
int PackedDataContainer::_size(uint32_t p_ofs) const {
PoolVector<uint8_t>::Read rd = data.read();
+ ERR_FAIL_COND_V(!rd.ptr(), 0);
const uint8_t *r = &rd[p_ofs];
uint32_t type = decode_uint32(r);