Update CCLuaEngine.cpp

Null pointer check in order to prevent crashes.