mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
[FZEditor]Null check layout name when creating new layout (#31851)
This commit is contained in:
@@ -212,7 +212,7 @@ namespace FancyZonesEditor
|
||||
foreach (LayoutModel customModel in MainWindowSettingsModel.CustomModels)
|
||||
{
|
||||
string name = customModel.Name;
|
||||
if (name.StartsWith(defaultNamePrefix, StringComparison.CurrentCulture))
|
||||
if (name != null && name.StartsWith(defaultNamePrefix, StringComparison.CurrentCulture))
|
||||
{
|
||||
if (int.TryParse(name.AsSpan(defaultNamePrefix.Length), out int i))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user