summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs
diff options
context:
space:
mode:
authorJimmy Garrido <jimmygarrido@outlook.com>2016-08-30 17:45:05 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-08-30 17:45:05 (GMT)
commitf551654b1cfe654c579ca50978445e7cb93f287d (patch)
treece1da71263753ed03d5055173828eaa9ea07e295 /Xamarin.Forms.Platform.iOS/iOSAppLinks.cs
parent61f34d113c9f6941194a6ed3101f54158de722a3 (diff)
downloadxamarin-forms-f551654b1cfe654c579ca50978445e7cb93f287d.zip
xamarin-forms-f551654b1cfe654c579ca50978445e7cb93f287d.tar.gz
xamarin-forms-f551654b1cfe654c579ca50978445e7cb93f287d.tar.bz2
Throw InvalidOperationException if AppLinkEntry.Thumbnail source is invalid (#299)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/iOSAppLinks.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/iOSAppLinks.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs b/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs
index de5876b..8c46ed0 100644
--- a/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs
+++ b/Xamarin.Forms.Platform.iOS/iOSAppLinks.cs
@@ -126,13 +126,17 @@ namespace Xamarin.Forms.Platform.iOS
try
{
uiimage = await handler.LoadImageAsync(source);
+
+ if (uiimage == null)
+ throw new InvalidOperationException("AppLinkEntry Thumbnail must be set to a valid source");
+
+ searchableAttributeSet.ThumbnailData = uiimage.AsPNG();
+ uiimage.Dispose();
}
catch (OperationCanceledException)
{
uiimage = null;
}
- searchableAttributeSet.ThumbnailData = uiimage.AsPNG();
- uiimage.Dispose();
}
return searchableAttributeSet;