mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Settings][New+]Crash when running Dev build of Settings (#35066)
This commit is contained in:
@@ -207,6 +207,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
settings = settingsUtils.GetSettingsOrDefault<NewPlusSettings>(NewPlusSettings.ModuleName);
|
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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user