Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Throw InvalidOperationException if AppLinkEntry.Thumbnail source is not valid #299

Merged
merged 1 commit into from Aug 30, 2016

Conversation

Projects
None yet
5 participants
@jimmgarrido
Copy link
Collaborator

commented Aug 11, 2016

Description of Change

Currently if the thumbnail source for an AppLinkEntry is not valid on iOS, a generic NRE is thrown when calling uiimage.AsPNG(). This fix checks if uiimage is null after trying to load the image and if so throws an InvalidOperationException to inform the user why. It also moves other code into the try block in order to avoid another NRE if an OperationCanceledException is caught.

This all assumes that the thumbnail is always required for an AppLinkEntry. If it's not, the null check should be used to just avoid calling uiimage.AsPNG() then instead of throwing an exception.

Bugs Fixed

API Changes

None

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@dnfclas

This comment has been minimized.

Copy link

commented Aug 11, 2016

Hi @jimmgarrido, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@rmarinho

This comment has been minimized.

Copy link
Member

commented Aug 11, 2016

Thanks, was on my TODO list.

Would just use nameof but that's no biggie, and squash commits please

👍

@jimmgarrido

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 11, 2016

Welp, looks like I messed up the rebase. Anyway to fix this or should I re-submit?

@rmarinho

This comment has been minimized.

Copy link
Member

commented Aug 16, 2016

yeah you can just branch master again locally, make your changes and force push to your same branch remotely, it will update this pr

@jimmgarrido jimmgarrido force-pushed the jimmgarrido:fix-bugzilla42061 branch from a21dc21 to d8fa905 Aug 17, 2016

@jimmgarrido

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2016

Awesome, everything should be good now. Thanks for the help!

@dnfclas

This comment has been minimized.

Copy link

commented Aug 28, 2016

@jimmgarrido, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

@dnfclas dnfclas added the cla-signed label Aug 28, 2016

@jassmith jassmith merged commit f551654 into xamarin:master Aug 30, 2016

stefandevo added a commit to stefandevo/Xamarin.Forms that referenced this pull request Aug 31, 2016

Merge branch 'master' of https://github.com/xamarin/Xamarin.Forms
* 'master' of https://github.com/xamarin/Xamarin.Forms: (69 commits)
  Fix docs
  [Win] Fix FontAttributes unexpectedly changing a label's size (xamarin#325)
  [A] Check UserVisibleHint to prevent non-active tabs from firing SendAppearing in OnResume (xamarin#328)
  KeyboardExtensions is now public (xamarin#326)
  [A] PanGestureRecognizer will consistently send Completed event (xamarin#313)
  Use character truncation in Windows (xamarin#321)
  Fix for ListView BindingContext for Header/Footer (xamarin#312)
  Fix memory leak caused by BaseCellView and RendererHolder (xamarin#311)
  Update Makefile to support linux env (xamarin#309)
  Platform Specifics (xamarin#301)
  Throw InvalidOperationException if AppLinkEntry.Thumbnail source is invalid (xamarin#299)
  Allow Custom Android MapRenderers to override the default MapView options (xamarin#285)
  Fix crash when ItemsSource is set to null (xamarin#320)
  Fixed SinInOut description. (xamarin#319)
  Fix regression by adding null check in Windows ListView selection (xamarin#314)
  [Android] Fix for NullReferenceException when using the wrong activit… (xamarin#286)
  [WinRT] Remove preemptive setting of null upon action sheet closure (xamarin#305)
  [Xaml] Clone node tree on DT, allow markup to be evaluated multiple times (xamarin#295)
  [Windows] Correct enter/esc keypress behaviors for MessageDialog (xamarin#292)
  [iOS] Change when we updated the XF INavigationPageController after popping a page natively, Cleanup UITest references (xamarin#291)
  ...

JoonghyunCho pushed a commit to JoonghyunCho/Xamarin.Forms that referenced this pull request Sep 1, 2016

@samhouts samhouts added this to the 2.3.3 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.