Sanity-check for null dirty rectangles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1857 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: RegionManager.java,v 1.4 2002/10/17 02:11:58 ray Exp $
|
// $Id: RegionManager.java,v 1.5 2002/10/29 20:33:26 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.media;
|
package com.threerings.media;
|
||||||
|
|
||||||
@@ -47,10 +47,16 @@ public class RegionManager
|
|||||||
*/
|
*/
|
||||||
public void addDirtyRegion (Rectangle rect)
|
public void addDirtyRegion (Rectangle rect)
|
||||||
{
|
{
|
||||||
if (rect.width != 0 && rect.height != 0) {
|
// sanity-check the rectangle
|
||||||
// Log.info("Invalidating " + StringUtil.toString(rect));
|
if (rect == null || (rect.width <= 0 || rect.height <= 0)) {
|
||||||
_dirty.add(rect);
|
Log.warning("Attempt to add invalid rectangle as a dirty region?!" +
|
||||||
|
"[rect=" + StringUtil.toString(rect) + "].");
|
||||||
|
Thread.dumpStack();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Log.info("Invalidating " + StringUtil.toString(rect));
|
||||||
|
_dirty.add(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user