|
|
@@ -19,6 +19,7 @@ function WebGLAnimation() {
|
|
|
|
|
|
if ( isAnimating === true ) return;
|
|
|
if ( animationLoop === null ) return;
|
|
|
+ if ( context === null ) return;
|
|
|
|
|
|
requestId = context.requestAnimationFrame( onAnimationFrame );
|
|
|
|
|
|
@@ -28,7 +29,7 @@ function WebGLAnimation() {
|
|
|
|
|
|
stop: function () {
|
|
|
|
|
|
- context.cancelAnimationFrame( requestId );
|
|
|
+ if ( context !== null ) context.cancelAnimationFrame( requestId );
|
|
|
|
|
|
isAnimating = false;
|
|
|
|