fix compile error

This commit is contained in:
coulsonwang 2019-03-18 16:08:25 +08:00
parent 3a3924f76f
commit 0825386827
1 changed files with 4 additions and 2 deletions
cocos/renderer/backend/opengl

View File

@ -24,14 +24,16 @@ DeviceGL::DeviceGL()
_deviceInfo = new (std::nothrow) DeviceInfoGL();
if(!_deviceInfo || _deviceInfo->init() == false)
{
CC_SAFE_RELEASE_NULL(_deviceInfo);
delete _deviceInfo;
_deviceInfo = nullptr;
}
}
DeviceGL::~DeviceGL()
{
ProgramCache::destroyInstance();
CC_SAFE_RELEASE_NULL(_deviceInfo);
delete _deviceInfo;
_deviceInfo = nullptr;
}
CommandBuffer* DeviceGL::newCommandBuffer()