Change-Id: Iccc85ecbf24612548b9827f0cdcb666cb59a6a6f
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
/// <param name="source">Image source specifying from where the image data has to be loaded.</param>
public async Task<bool> LoadFromImageSourceAsync(ImageSource source)
{
- IImageSourceHandler handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType());
-
_imageLoadCompleted = false;
+ IImageSourceHandler handler;
- if (source != null && handler != null)
+ if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
{
_imageLoadCompleted = await handler.LoadImageAsync(this, source);
}