diff --git a/index.php b/index.php index 39038d6..66cefd0 100644 --- a/index.php +++ b/index.php @@ -47,7 +47,7 @@ iceRoot = ""; window.onbeforeunload = function() { for(var i=1;i<=ICEcoder.savedPoints.length;i++) { - if (ICEcoder.savedPoints[i-1]!=top.ICEcoder.getcMInstance(ICEcoder.cMInstances[i-1]).changeGeneration()) { + if (ICEcoder.savedPoints[i-1]!=top.ICEcoder.getcMInstance(i).changeGeneration()) { return "You have some unsaved changes."; } }