fixed #689: assert the width and height of rect is big than 0

This commit is contained in:
minggo 2011-08-22 14:55:51 +08:00
parent cd4a08aa6a
commit 19244406d6
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,9 @@ CCRect::CCRect(void)
CCRect::CCRect(float x, float y, float width, float height)
{
// Only support that, the width and height > 0
assert(width > 0 && height > 0);
origin.x = x;
origin.y = y;