mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
[Settings][New+]Crash when running Dev build of Settings (#35066)
This commit is contained in:
parent
471db8bf9c
commit
13c9ba9f81
@ -207,6 +207,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
try
|
||||
{
|
||||
settings = settingsUtils.GetSettingsOrDefault<NewPlusSettings>(NewPlusSettings.ModuleName);
|
||||
|
||||
if (string.IsNullOrEmpty(settings.TemplateLocation))
|
||||
{
|
||||
// This can happen when running the DEBUG Settings application without first letting the runner create the default settings file.
|
||||
settings.TemplateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user