Skip to content

Commit e7ec7ef

Browse files
authored
[Xamarin.MacDev] Fail gracefully if trying to grab a PList entry from a file that doesn't exist. (#86)
We run into this code path on Mac Catalyst.
1 parent fae0237 commit e7ec7ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Xamarin.MacDev/MacOSXSdk.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ public AppleDTSettings GetAppleDTSettings ()
270270

271271
static string GrabRootString (string file, string key)
272272
{
273+
if (!File.Exists (file))
274+
return null;
275+
273276
var dict = PDictionary.FromFile (file);
274277
PString value;
275278

0 commit comments

Comments
 (0)