Sanity check the sources we're passed for compositing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1511 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CompositedActionFrames.java,v 1.5 2002/06/19 23:31:57 mdb Exp $
|
// $Id: CompositedActionFrames.java,v 1.6 2002/06/20 18:31:03 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cast;
|
package com.threerings.cast;
|
||||||
|
|
||||||
@@ -29,7 +29,14 @@ public class CompositedActionFrames
|
|||||||
*/
|
*/
|
||||||
public CompositedActionFrames (ActionFrames[] sources)
|
public CompositedActionFrames (ActionFrames[] sources)
|
||||||
{
|
{
|
||||||
|
// sanity check
|
||||||
|
if (sources == null || sources.length == 0) {
|
||||||
|
String errmsg = "Requested to composite invalid set of source " +
|
||||||
|
"frames! [sources=" + StringUtil.toString(sources) + "].";
|
||||||
|
throw new RuntimeException(errmsg);
|
||||||
|
}
|
||||||
_sources = sources;
|
_sources = sources;
|
||||||
|
|
||||||
// the sources must all have the same frame count, and each
|
// the sources must all have the same frame count, and each
|
||||||
// orientation must also have the same frame count, so we just use
|
// orientation must also have the same frame count, so we just use
|
||||||
// the count from the first source and first orientation
|
// the count from the first source and first orientation
|
||||||
|
|||||||
Reference in New Issue
Block a user