diff --git a/tiny_gltf.h b/tiny_gltf.h index 9fd1ee7..9b5fbc2 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -3229,9 +3229,11 @@ static bool ParseJsonAsValue(Value *ret, const json &o) { break; } #endif + const bool isNotNull = val.Type() != NULL_TYPE; + if (ret) *ret = std::move(val); - return val.Type() != NULL_TYPE; + return isNotNull; } static bool ParseExtrasProperty(Value *ret, const json &o) {