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

[xcode10.1] [mediaplayer] Fix NRE in MPNowPlayingInfoCenter wrt null dictionary entries. Fixes #4988 #4997

Merged

Conversation

monojenkins
Copy link
Collaborator

Backport of #4992.

/cc @spouliot

Description:
The custom TryGetValue could return true and an out null. That was
fine for many items, e.g. converting null to NSString or NSDate is
fine.

However this cause an NullReferenceException when trying to create
arrays (thru NSArray) or converting NSNumber into value types.

The normal TryGetValue behavior fixes this - and avoid extraneous
(and non-required) conversions of null items.

ref: #4988

…ntries. Fixes dotnet#4988

The custom `TryGetValue` could return `true` and an `out null`. That was
fine for many items, e.g. converting `null` to `NSString` or `NSDate` is
fine.

However this cause an `NullReferenceException` when trying to create
arrays (thru `NSArray`) or converting `NSNumber` into value types.

The _normal_ `TryGetValue` behavior fixes this - and avoid extraneous
(and non-required) conversions of `null` items.

ref: dotnet#4988
@monojenkins monojenkins added this to the xcode10.1 milestone Oct 16, 2018
@monojenkins
Copy link
Collaborator Author

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (only version changes)
Test run succeeded

@spouliot spouliot merged commit 679619e into dotnet:xcode10.1 Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants