summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkleem <cdark.lim@samsung.com>2017-10-12 07:00:18 (GMT)
committerchungryeol Lim <cdark.lim@samsung.com>2017-10-23 05:43:59 (GMT)
commit00b2a18605b34c092c8fb588188353c300e7bba1 (patch)
tree435a437e2ec7dd77c1edd53b40af1b9a2b6f188e
parent3ea0dc31dfd8d8a1850952d0cfb4ea93b3defd40 (diff)
downloadxamarin-forms-00b2a18605b34c092c8fb588188353c300e7bba1.zip
xamarin-forms-00b2a18605b34c092c8fb588188353c300e7bba1.tar.gz
xamarin-forms-00b2a18605b34c092c8fb588188353c300e7bba1.tar.bz2
Fixed Image source is not nullrefs/changes/47/155147/6
- TASK=TCAPI-2716 Change-Id: I75437cca6aadb74379e47d3af6994422e8dff2e4 Signed-off-by: darkleem <cdark.lim@samsung.com>
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Image.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Image.cs b/Xamarin.Forms.Platform.Tizen/Native/Image.cs
index e4ec267..c935866 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Image.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Image.cs
@@ -54,12 +54,18 @@ namespace Xamarin.Forms.Platform.Tizen.Native
public async Task<bool> LoadFromImageSourceAsync(ImageSource source)
{
IImageSourceHandler handler;
-
+ bool isLoadComplate = false;
if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
{
- return await handler.LoadImageAsync(this, source);
+ isLoadComplate = await handler.LoadImageAsync(this, source);
+ }
+ if (!isLoadComplate)
+ {
+ //If it fails, call the Load function to remove the previous image.
+ Load(string.Empty);
}
- return false;
+
+ return isLoadComplate;
}
/// <summary>