Merge pull request #7266 from dabingnn/v3_fix

V3 fix
This commit is contained in:
minggo 2014-07-01 15:52:50 +08:00
commit 39650e12c4
2 changed files with 1 additions and 3 deletions

View File

@ -341,7 +341,6 @@ Effect3DOutline::Effect3DOutline()
Effect3DOutline::~Effect3DOutline() Effect3DOutline::~Effect3DOutline()
{ {
CC_SAFE_RELEASE_NULL(_sprite);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener); Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener);
#endif #endif
@ -371,8 +370,6 @@ void Effect3DOutline::setTarget(EffectSprite3D *sprite)
if(sprite != _sprite) if(sprite != _sprite)
{ {
CC_SAFE_RETAIN(sprite);
CC_SAFE_RELEASE_NULL(_sprite);
_sprite = sprite; _sprite = sprite;
auto mesh = sprite->getMesh(); auto mesh = sprite->getMesh();

View File

@ -103,6 +103,7 @@ protected:
Vec3 _outlineColor; Vec3 _outlineColor;
float _outlineWidth; float _outlineWidth;
//weak reference
EffectSprite3D* _sprite; EffectSprite3D* _sprite;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
EventListenerCustom* _backToForegroundListener; EventListenerCustom* _backToForegroundListener;