Skip cloning device information from parent virtual desktop if it is deleted. (#1415)

This commit is contained in:
vldmr11080 2020-03-02 18:52:38 +01:00 committed by GitHub
parent 699921d464
commit 6556e1b4a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)