diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp index bf2e3be0f7..ae5d984085 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp @@ -402,7 +402,7 @@ void Layer::onExit() // remove this layer from the delegates who concern Accelerometer Sensor if (_accelerometerEnabled) { - pDirector->getAccelerometer()->setDelegate(NULL); + pDirector->getAccelerometer()->setDelegate(nullptr); } // remove this layer from the delegates who concern the keypad msg