/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
// If rhs is same matrix with result, we need to copy temperal vaules.
temp = static_cast<float*>(malloc(NUM_BYTES_IN_MATRIX));
+ DALI_ASSERT_ALWAYS(temp && "malloc is failed.");
memcpy(temp, rhsPtr, NUM_BYTES_IN_MATRIX);
rhsPtr = temp;
}
{
// If rhs is same matrix with result, we need to copy temperal vaules.
temp = static_cast<float*>(malloc(NUM_BYTES_IN_MATRIX3));
+ DALI_ASSERT_ALWAYS(temp && "malloc is failed.");
memcpy(temp, rhsPtr, NUM_BYTES_IN_MATRIX3);
rhsPtr = temp;
}
{
// If the base property is not registered yet, register the base property first.
RegisterAnimatableProperty(*typeInfo, basePropertyIndex, value);
+ DALI_ASSERT_ALWAYS(mAnimatableProperties.Size() > 0u && "Something wrong when we register animatable base property!");
+
animatableProperty = static_cast<AnimatablePropertyMetadata*>(mAnimatableProperties[mAnimatableProperties.Size() - 1]);
}
// Create the metadata for the property component.
mAnimatableProperties.PushBack(new AnimatablePropertyMetadata(index, typeInfo->GetComponentIndex(index), animatableProperty->value, animatableProperty->GetSceneGraphProperty()));
}
+ DALI_ASSERT_ALWAYS(mAnimatableProperties.Size() > 0u && "Something wrong when we register new animatable property!");
// The metadata has just been added and therefore should be in the end of the vector.
animatableProperty = static_cast<AnimatablePropertyMetadata*>(mAnimatableProperties[mAnimatableProperties.Size() - 1]);