mirror of https://github.com/axmolengine/axmol.git
fixed #689: assert the width and height of rect is big than 0
This commit is contained in:
parent
cd4a08aa6a
commit
19244406d6
|
@ -76,6 +76,9 @@ CCRect::CCRect(void)
|
||||||
|
|
||||||
CCRect::CCRect(float x, float y, float width, float height)
|
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.x = x;
|
||||||
origin.y = y;
|
origin.y = y;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue