From a6afb2229d14981bff00de103ecec397bc067e5a Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 6 Apr 2025 10:42:25 +0200 Subject: C++: Fix bug in array_fill helper function --- src/Array.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Array.cpp b/src/Array.cpp index be7eb86..d739c64 100644 --- a/src/Array.cpp +++ b/src/Array.cpp @@ -40,7 +40,9 @@ static void array_fill(Array *_this, std::vector &array, plist_t node) do { subnode = NULL; plist_array_next_item(node, iter, &subnode); - array.push_back( Node::FromPlist(subnode, _this) ); + if (subnode) { + array.push_back( Node::FromPlist(subnode, _this) ); + } } while (subnode); free(iter); } -- cgit v1.1-32-gdbae