diff core.js @ 1735:50297ebb1c41

Fixed Bug 1204: Multiple clicks creates multiple instances.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Fri, 01 May 2015 16:07:15 +0100
parents 7c7daa0eaebc
children ffeef0ac7a5f
line wrap: on
line diff
--- a/core.js	Fri May 01 15:52:13 2015 +0100
+++ b/core.js	Fri May 01 16:07:15 2015 +0100
@@ -170,8 +170,11 @@
 	};
 	
 	this.stop = function() {
-		this.bufferNode.stop(0);
-		this.bufferNode = undefined;
+		if (this.bufferNode != undefined)
+		{
+			this.bufferNode.stop(0);
+			this.bufferNode = undefined;
+		}
 	};
 
 	this.constructTrack = function(url) {