[CA-211418] Exception in XenCenter while attaching vdi to a VM on a pool with an SR with 20,000 VDIs

Added back the event handler removal in BuildList function, as it can run more than once.

Signed-off-by: Frederico Mazzone <fredericom@citrite.net>
This commit is contained in:
Frederico Mazzone 2016-05-31 11:23:31 +01:00
parent b401a11e76
commit b21d87e6e6

View File

@ -161,9 +161,11 @@ namespace XenAdmin.Dialogs
DiskListVdiItem VDIitem = new DiskListVdiItem(TheVDI);
if (VDIitem.Show)
DiskListTreeView.AddChildNode(item, VDIitem);
TheVDI.PropertyChanged -= new PropertyChangedEventHandler(Server_Changed);
TheVDI.PropertyChanged += new PropertyChangedEventHandler(Server_Changed);
}
}
sr.PropertyChanged -= new PropertyChangedEventHandler(Server_Changed);
sr.PropertyChanged += new PropertyChangedEventHandler(Server_Changed);
}
}