From 8bac29d220d7e51168a7a5b2f6d6e00b67f3c54e Mon Sep 17 00:00:00 2001 From: scottdowne Date: Fri, 24 Aug 2012 14:06:28 -0400 Subject: [PATCH] [#1308] Check to make sure a media wrapper exists before we start using it. --- modules/player/popcorn.player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/player/popcorn.player.js b/modules/player/popcorn.player.js index 02b1b409..faf4a8fc 100644 --- a/modules/player/popcorn.player.js +++ b/modules/player/popcorn.player.js @@ -366,7 +366,7 @@ // See if we can use a wrapper directly, if not, try players. for ( j = 0; j < wrappers.length; j++ ) { mediaWrapper = Popcorn[ wrappers[ j ] ]; - if ( mediaWrapper._canPlaySrc( srci ) === "probably" ) { + if ( mediaWrapper && mediaWrapper._canPlaySrc( srci ) === "probably" ) { media = mediaWrapper( node ); popcorn = Popcorn( media, options ); // Set src, but not until after we return the media so the caller