From 0c8fad2425b3a7cec989a8f5657d8c8570400b5c Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 3 Nov 2021 11:42:06 -0400 Subject: [PATCH] cwObjectTemplate.h : Fix bug in _objCallSetLeafValue(). --- cwObjectTemplate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cwObjectTemplate.h b/cwObjectTemplate.h index b78ccd9..5c8b3ff 100644 --- a/cwObjectTemplate.h +++ b/cwObjectTemplate.h @@ -108,7 +108,8 @@ namespace cw if( obj != nullptr ) { // The object value is about to be overwritten so be sure it is deallocated first. - obj->type->free_value(obj); + if( obj->type != nullptr ) + obj->type->free_value(obj); // Set the object value and type id. obj = _objSetLeafValue(obj,v);