diff options
author | 2025-04-06 10:42:25 +0200 | |
---|---|---|
committer | 2025-04-06 10:42:25 +0200 | |
commit | a6afb2229d14981bff00de103ecec397bc067e5a (patch) | |
tree | a2bf09201c5b4c1eebc33326a9edb168905ff0e2 /src/Array.cpp | |
parent | 02ceecad2a885f031d2238c644772055bcb42548 (diff) | |
download | libplist-a6afb2229d14981bff00de103ecec397bc067e5a.tar.gz libplist-a6afb2229d14981bff00de103ecec397bc067e5a.tar.bz2 |
C++: Fix bug in array_fill helper function
Diffstat (limited to 'src/Array.cpp')
-rw-r--r-- | src/Array.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<Node*> &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); } |