FileSystem.Mount(string, string?) should check `package` for null before attempting to mount #12789

Closed
Phrohdoh opened this Issue Feb 17, 2017 · 0 comments

Projects

None yet

1 participant

@Phrohdoh
Member
Phrohdoh commented Feb 17, 2017 edited

https://github.com/OpenRA/OpenRA/blob/eaf55a864c58ac27bdaf9251603131e5c9d0dab4/OpenRA.Game/FileSystem/FileSystem.cs#L126

Currently you get an ArgumentNullException, from Dictionary.TryGetValue which isn't helpful.

Exception of type `System.ArgumentNullException`: Value cannot be null.
Parameter name: key
  at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) [0x00006] in <829ce140006e4cad9124766ee7f51179>:0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x0000b] in <829ce140006e4cad9124766ee7f51179>:0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <829ce140006e4cad9124766ee7f51179>:0
  at OpenRA.FileSystem.FileSystem.Mount (OpenRA.FileSystem.IReadOnlyPackage package, System.String explicitName) [0x00004] in <f7acde33042c4e48b81a545ce4cfd61b>:0
@pchote pchote closed this in #12790 Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment