# HG changeset patch # User Nicholas Jillings # Date 1456228571 0 # Node ID 8fad6ccb12d215456781a09f17bcbbba67767dfd # Parent e97471529c641554f0459735608e40bf9a7520bc Fix Safari error (event.currentTarget.owner) line 1365 diff -r e97471529c64 -r 8fad6ccb12d2 core.js --- a/core.js Tue Feb 23 11:41:25 2016 +0000 +++ b/core.js Tue Feb 23 11:56:11 2016 +0000 @@ -1362,7 +1362,9 @@ this.bufferNode.onended = function(event) { // Safari does not like using 'this' to reference the calling object! //event.currentTarget.owner.metric.stopListening(audioEngineContext.timer.getTestTime(),event.currentTarget.owner.getCurrentPosition()); - event.currentTarget.owner.stop(audioContext.currentTime+1); + if (event.currentTarget != null) { + event.currentTarget.owner.stop(audioContext.currentTime+1); + } }; if (this.bufferNode.loop == false) { this.metric.startListening(audioEngineContext.timer.getTestTime());