mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
Skip cloning device information from parent virtual desktop if it is deleted. (#1415)
This commit is contained in:
parent
699921d464
commit
6556e1b4a2
@ -209,7 +209,18 @@ namespace JSONHelpers
|
||||
|
||||
void FancyZonesData::CloneDeviceInfo(const std::wstring& source, const std::wstring& destination)
|
||||
{
|
||||
if (source == destination)
|
||||
{
|
||||
return;
|
||||
}
|
||||
std::scoped_lock lock{ dataLock };
|
||||
|
||||
// The source virtual desktop is deleted, simply ignore it.
|
||||
if (!deviceInfoMap.contains(source))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Clone information from source device if destination device is uninitialized (Blank).
|
||||
auto& destInfo = deviceInfoMap[destination];
|
||||
if (destInfo.activeZoneSet.type == ZoneSetLayoutType::Blank)
|
||||
|
Loading…
Reference in New Issue
Block a user