Skip to content

Commit

Permalink
Fix to properly delete easingParams array (#20374)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabify authored and minggo committed Nov 27, 2019
1 parent 5a9ec25 commit a217661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos/editor-support/cocostudio/CCDatas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ FrameData::FrameData()

FrameData::~FrameData()
{
CC_SAFE_DELETE(easingParams);
CC_SAFE_DELETE_ARRAY(easingParams);
}

void FrameData::copy(const BaseData *baseData)
Expand All @@ -281,7 +281,7 @@ void FrameData::copy(const BaseData *baseData)
tweenEasing = frameData->tweenEasing;
easingParamNumber = frameData->easingParamNumber;

CC_SAFE_DELETE(easingParams);
CC_SAFE_DELETE_ARRAY(easingParams);
if (easingParamNumber != 0)
{
easingParams = new (std::nothrow) float[easingParamNumber];
Expand Down

0 comments on commit a217661

Please sign in to comment.