Skip to content

Commit 4ad5b05

Browse files
committed
CM bugs
1 parent 06ddd44 commit 4ad5b05

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Terminal.Gui/Configuration/SettingsScope.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ public class SettingsScope : Scope<SettingsScope>
152152
return this;
153153
}
154154

155-
// BUG: Not trim-compatible
156-
// Not a bug, per se, but it's easily fixable by just loading the file.
157-
// Defaults can just be field initializers for involved types.
158-
using Stream? stream = assembly.GetManifestResourceStream (resourceName)!;
155+
using Stream? stream = assembly.GetManifestResourceStream (resourceName);
156+
157+
if (stream is null)
158+
{
159+
return null;
160+
}
159161

160162
return Update (stream, $"resource://[{assembly.GetName ().Name}]/{resourceName}", location);
161163
}

0 commit comments

Comments
 (0)