cwObjectTemplate.h : Fix bug in _objCallSetLeafValue().

This commit is contained in:
kevin 2021-11-03 11:42:06 -04:00
parent fff58a8d4c
commit 0c8fad2425

View File

@ -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);