Fix live2d sdk crash issue

This commit is contained in:
halx99 2023-02-23 21:59:00 +08:00
parent 1ae9cd33ae
commit a00d594ba0
2 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,6 @@ CubismCommandBuffer_Cocos2dx::DrawCommandBuffer::DrawCommand* CubismCommandBuffe
CubismCommandBuffer_Cocos2dx::CubismCommandBuffer_Cocos2dx()
:_currentColorBuffer(NULL)
{
_groupCommand.init(0.0);
}
CubismCommandBuffer_Cocos2dx::~CubismCommandBuffer_Cocos2dx()
@ -117,8 +116,10 @@ CubismCommandBuffer_Cocos2dx::~CubismCommandBuffer_Cocos2dx()
void CubismCommandBuffer_Cocos2dx::PushCommandGroup()
{
GetCocos2dRenderer()->addCommand(&_groupCommand);
GetCocos2dRenderer()->pushGroup(_groupCommand.getRenderQueueID());
auto groupCommand = GetCocos2dRenderer()->getNextGroupCommand();
groupCommand->init(0.0);
GetCocos2dRenderer()->addCommand(groupCommand);
GetCocos2dRenderer()->pushGroup(groupCommand->getRenderQueueID());
}
void CubismCommandBuffer_Cocos2dx::PopCommandGroup()

View File

@ -160,7 +160,6 @@ private:
backend::TextureBackend* _currentColorBuffer;
OperationStateData _operationStateArray[OperationType_TypeMax];
ax::GroupCommand _groupCommand;
};
}}}}