Fix serialization of delegates without targets
authorStephen Toub <stoub@microsoft.com>
Thu, 18 Aug 2016 18:06:39 +0000 (14:06 -0400)
committerStephen Toub <stoub@microsoft.com>
Thu, 18 Aug 2016 18:06:39 +0000 (14:06 -0400)
commit23a316f3be84fbde32f3b02854529f9663558807
treec3c5b4cee6ecbe8edfe8355b7d8cddf908056a6e
parentc539075014bce7344d5d4cba24afa86ca660051e
Fix serialization of delegates without targets

A null check is missing when FEATURE_REMOTING is not defined, resulting in an invalid cast exception when deserializing a delegate without a target (e.g. a delegate for a static method).

Commit migrated from https://github.com/dotnet/coreclr/commit/3871c8b73ef7f29c7b392ed4992781fa8634579c
src/coreclr/src/mscorlib/src/System/DelegateSerializationHolder.cs