From 0825386827ae4de14bfceccc51457b3516e50033 Mon Sep 17 00:00:00 2001 From: coulsonwang Date: Mon, 18 Mar 2019 16:08:25 +0800 Subject: [PATCH] fix compile error --- cocos/renderer/backend/opengl/DeviceGL.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cocos/renderer/backend/opengl/DeviceGL.cpp b/cocos/renderer/backend/opengl/DeviceGL.cpp index abcb6c9d06..2f5cf98530 100644 --- a/cocos/renderer/backend/opengl/DeviceGL.cpp +++ b/cocos/renderer/backend/opengl/DeviceGL.cpp @@ -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()