Merge pull request #2950 from zcgit/develop

a potential bug in Layer.
This commit is contained in:
James Chen 2013-08-19 19:02:53 -07:00
commit 7e3d3b3d3e
2 changed files with 3 additions and 3 deletions

View File

@ -68,8 +68,8 @@ bool Layer::init()
Director * pDirector;
CC_BREAK_IF(!(pDirector = Director::getInstance()));
this->setContentSize(pDirector->getWinSize());
_touchEnabled = false;
_accelerometerEnabled = false;
setTouchEnabled(false);
setAccelerometerEnabled(false);
// success
bRet = true;
} while(0);

View File

@ -183,7 +183,7 @@ void ScrollView::setTouchEnabled(bool e)
{
_dragging = false;
_touchMoved = false;
_touches->removeAllObjects();
if(_touches)_touches->removeAllObjects();
}
}