Skip to content

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

Merged
spouliot merged 1 commit into
dotnet:xcode10.1from
monojenkins:backport-pr-4992-to-xcode10.1
Oct 17, 2018
Merged

[xcode10.1] [mediaplayer] Fix NRE in MPNowPlayingInfoCenter wrt null dictionary entries. Fixes #4988#4997
spouliot merged 1 commit into
dotnet:xcode10.1from
monojenkins:backport-pr-4992-to-xcode10.1

Conversation

@monojenkins

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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