<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I agree with Bob. Just catching the exception before the user sees it would be a good enough fix. You could have an Alice alert (instead of a Queen alert) that says something to the effect of “The action at the end of the While the world is running event was
 not run, because the world has stopped.” Then it is not a silent fail, so the user does not have to wonder why the code was not run. The user gets a descriptive error message rather than a NullPointerException.
<div class=""><br class="">
</div>
<div class="">James<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor, Computer Science<br class="">
Program Director, Master of Applied Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
<br class="">
<div>
<div class="">On Mar 1, 2017, at 8:51 PM, robert durtschi <<a href="mailto:robert.durtschi@gcsu.edu" class="">robert.durtschi@gcsu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Since
 the error only occurs when the "play" window is closed. I Think (not actually looking at the "play" window close handler) that it could be captured there with an exception handler that would catch the null handle exception and kill it before it got high enough
 to be visible.</span><br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
</div>
</div>
<br class="">
</div>
</body>
</html>