[FancyZones Editor] Fix crash on closing after deleting a custom layout. (#13394)

This commit is contained in:
Seraphima Zykova 2021-09-23 18:24:24 +03:00 committed by GitHub
parent f647223e94
commit 2130cef3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,6 +419,11 @@ namespace FancyZonesEditor
{
LayoutModel model = element.DataContext as LayoutModel;
if (model.Guid == _backup.Guid)
{
_backup = null;
}
if (model == _settings.AppliedModel)
{
_settings.SetAppliedModel(_settings.BlankModel);