Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding a null check for sounder loader in case it is null already

  • Loading branch information...
commit 3baccf10eb082255202c4fe9e281e0dce539dcf9 1 parent 051ba87
@hybridmindset authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/com/pblabs/engine/resource/SoundResource.as
View
6 src/com/pblabs/engine/resource/SoundResource.as
@@ -42,8 +42,10 @@ package com.pblabs.engine.resource
if (onContentReady(event ? (event as MP3SoundEvent).sound : null))
{
_isLoaded = true;
- _soundLoader.removeEventListener(MP3SoundEvent.COMPLETE, onLoadComplete);
- _soundLoader = null;
+ if(_soundLoader){
+ _soundLoader.removeEventListener(MP3SoundEvent.COMPLETE, onLoadComplete);
+ _soundLoader = null;
+ }
dispatchEvent(new ResourceEvent(ResourceEvent.LOADED_EVENT, this));
return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.