From 19244406d654bddd3b335e1b1decaa121a14a928 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 22 Aug 2011 14:55:51 +0800 Subject: [PATCH] fixed #689: assert the width and height of rect is big than 0 --- cocos2dx/cocoa/CCGeometry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos2dx/cocoa/CCGeometry.cpp b/cocos2dx/cocoa/CCGeometry.cpp index 3b476cea04..cda28e9c29 100644 --- a/cocos2dx/cocoa/CCGeometry.cpp +++ b/cocos2dx/cocoa/CCGeometry.cpp @@ -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;