From 674463040942b360a3684dcae406a735828bd01c Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sun, 15 Feb 2026 16:20:24 +0100 Subject: [PATCH 1/4] fix a NullReferenceException on iOS * occurs in the OxyplotMauiSample when opening the PanModePage --- Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs b/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs index a7321aa..9c9c649 100644 --- a/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs +++ b/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs @@ -13,10 +13,10 @@ public Stream Load(string fontName) fontRegistrar = IPlatformApplication.Current.Services.GetRequiredService(); fontName = fontRegistrar.GetFont(fontName); - if (File.Exists(fontName)) - { + if (fontName == null) + return null; + else if (File.Exists(fontName)) return File.OpenRead(fontName); - } try { From d3d3f9ad3c766446368641e83931305f41bc158c Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sun, 15 Feb 2026 16:28:18 +0100 Subject: [PATCH 2/4] OxyplotMauiSample: fix typo in app name --- Source/OxyplotMauiSample/OxyplotMauiSample.csproj | 4 ++-- Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml | 2 +- Source/OxyplotMauiSample/Platforms/Windows/app.manifest | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/OxyplotMauiSample/OxyplotMauiSample.csproj b/Source/OxyplotMauiSample/OxyplotMauiSample.csproj index c3649bb..ea1591d 100644 --- a/Source/OxyplotMauiSample/OxyplotMauiSample.csproj +++ b/Source/OxyplotMauiSample/OxyplotMauiSample.csproj @@ -13,10 +13,10 @@ enable - OxyplotMauiSimple + OxyplotMauiSample - com.companyname.oxyplotmauisimple + com.companyname.oxyplotmauisample 2C1CD083-05E3-4080-840A-EC3B8334CCD7 diff --git a/Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml b/Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml index 1c43010..e7a67f1 100644 --- a/Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml +++ b/Source/OxyplotMauiSample/Platforms/Tizen/tizen-manifest.xml @@ -1,7 +1,7 @@  - + maui-appicon-placeholder diff --git a/Source/OxyplotMauiSample/Platforms/Windows/app.manifest b/Source/OxyplotMauiSample/Platforms/Windows/app.manifest index cccce6a..1664b44 100644 --- a/Source/OxyplotMauiSample/Platforms/Windows/app.manifest +++ b/Source/OxyplotMauiSample/Platforms/Windows/app.manifest @@ -1,6 +1,6 @@ - + From cc4b0979672e7bfef02540910efc7f2a752d69dc Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sun, 15 Feb 2026 17:27:43 +0100 Subject: [PATCH 3/4] OxyplotMauiSample: update MAUI to 10.0.40 * in order to fix strange crashes when opening PanModePage (on Android and iOS) * $(MauiVersion) seems to resovle to 10.0.1 with .NET SDK 10.0.103 --- Source/OxyplotMauiSample/OxyplotMauiSample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OxyplotMauiSample/OxyplotMauiSample.csproj b/Source/OxyplotMauiSample/OxyplotMauiSample.csproj index ea1591d..7cd2720 100644 --- a/Source/OxyplotMauiSample/OxyplotMauiSample.csproj +++ b/Source/OxyplotMauiSample/OxyplotMauiSample.csproj @@ -62,7 +62,7 @@ - + From 86646c8c1b11fce25101f05dee40cdd3cfb31ddd Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sun, 15 Feb 2026 18:59:23 +0100 Subject: [PATCH 4/4] MauiFontLoader.Load: use fontName as fallback if GetFont fails (on iOS) * and mirror the same behavior on MacCatalyst * as suggested by Copilot --- .../Platforms/MacCatalyst/MauiFontLoader.cs | 8 ++++---- Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/OxyPlot.Maui.Skia/Platforms/MacCatalyst/MauiFontLoader.cs b/Source/OxyPlot.Maui.Skia/Platforms/MacCatalyst/MauiFontLoader.cs index 3928329..1931d5f 100644 --- a/Source/OxyPlot.Maui.Skia/Platforms/MacCatalyst/MauiFontLoader.cs +++ b/Source/OxyPlot.Maui.Skia/Platforms/MacCatalyst/MauiFontLoader.cs @@ -12,11 +12,11 @@ public Stream Load(string fontName) if (fontRegistrar == null) fontRegistrar = IPlatformApplication.Current.Services.GetRequiredService(); - fontName = fontRegistrar.GetFont(fontName); - if (File.Exists(fontName)) - { + fontName = fontRegistrar.GetFont(fontName) ?? fontName; + if (fontName == null) + return null; + else if (File.Exists(fontName)) return File.OpenRead(fontName); - } try { diff --git a/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs b/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs index 9c9c649..70e9bba 100644 --- a/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs +++ b/Source/OxyPlot.Maui.Skia/Platforms/iOS/MauiFontLoader.cs @@ -12,7 +12,7 @@ public Stream Load(string fontName) if (fontRegistrar == null) fontRegistrar = IPlatformApplication.Current.Services.GetRequiredService(); - fontName = fontRegistrar.GetFont(fontName); + fontName = fontRegistrar.GetFont(fontName) ?? fontName; if (fontName == null) return null; else if (File.Exists(fontName))