Load corrupt image problem!

Hi everyone!

I’m trying to load an image from my HDD, using Loader. The code is something like this:


var loader:Loader = new Loader();

loader.contentLoaderInfo.removeEventListener(Event.INIT,initHandler);
			loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, IOErrorEventHandler);

loader.load(new URLRequest("image.jpg"));





Everything seems right if the image.jpg is really a jpg file. But in the case this file is corrupted or damaged, my application stop running without any event dispatched! What should i do?

Every suggestion is warmly welcome!