aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility/Utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic-extension/utility/Utilities.cpp')
-rw-r--r--extension/src/openvic-extension/utility/Utilities.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.cpp b/extension/src/openvic-extension/utility/Utilities.cpp
index 7450212..4389e95 100644
--- a/extension/src/openvic-extension/utility/Utilities.cpp
+++ b/extension/src/openvic-extension/utility/Utilities.cpp
@@ -80,7 +80,8 @@ static Ref<Image> load_dds_image(String const& path) {
);
PackedByteArray pixels;
- pixels.resize(size);
+ ERR_FAIL_COND_V(pixels.resize(size) != OK, nullptr);
+
/* Index offset used to control whether we are reading */
const size_t rb_idx = 2 * needs_bgr_to_rgb;
uint8_t const* ptr = static_cast<uint8_t const*>(texture.data());