diff --git a/src/as/com/threerings/util/Assert.as b/src/as/com/threerings/util/Assert.as index b4cceb0f9..6c2c259b9 100644 --- a/src/as/com/threerings/util/Assert.as +++ b/src/as/com/threerings/util/Assert.as @@ -22,6 +22,7 @@ package com.threerings.util { import flash.system.Capabilities; +import flash.system.System; /** * Simple implementation of assertion checks for debug environments. @@ -81,6 +82,14 @@ public class Assert if (dumpStack) { _log.warning(new Error("dumpStack").getStackTrace()); } + + // try to exit, but don't booch if we're running in an older player + var o :Object = System; + try { + o["exit"](1); // call System.exit(1); + } catch (err :SecurityError) { + // probably not allowed + } } protected static var _log :Log = Log.getLog(Assert);