From 205d246e8a42071f3374a272653d01a7a47cb98c Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Fri, 21 Jul 2023 10:46:28 +0800 Subject: [PATCH] to check element after Collection::Insert --- src/Type/Collection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Type/Collection.cpp b/src/Type/Collection.cpp index fcbb89e..233708c 100644 --- a/src/Type/Collection.cpp +++ b/src/Type/Collection.cpp @@ -127,6 +127,9 @@ namespace hgl */ bool Collection::Insert(const uint64 offset,const void *element) { + if(!element) + return(false); + if(data_count==0) return Add(element);