From 44209f2c31d8bbb41f86675caa9ad4367141f702 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 10 Feb 2021 11:30:34 +0100 Subject: [PATCH] [Xamarin.MacDev] Fail gracefully if trying to grab a PList entry from a file that doesn't exist. We run into this code path on Mac Catalyst. --- Xamarin.MacDev/MacOSXSdk.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xamarin.MacDev/MacOSXSdk.cs b/Xamarin.MacDev/MacOSXSdk.cs index d4bc7d5..39e7a95 100644 --- a/Xamarin.MacDev/MacOSXSdk.cs +++ b/Xamarin.MacDev/MacOSXSdk.cs @@ -270,6 +270,9 @@ public AppleDTSettings GetAppleDTSettings () static string GrabRootString (string file, string key) { + if (!File.Exists (file)) + return null; + var dict = PDictionary.FromFile (file); PString value;