Fixing a duplicate addition exception that can occur if you launch a sim twice on the same grid.

0.1-prestable
Adam Frisby 2007-05-06 23:54:36 +00:00
parent 1b7f74bc7e
commit 982421e285
1 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,14 @@ namespace OpenGrid.Framework.Data.DB4o
/// <returns>Successful?</returns> /// <returns>Successful?</returns>
public bool AddRow(SimProfileData row) public bool AddRow(SimProfileData row)
{ {
profiles.Add(row.UUID, row); if (profiles.ContainsKey(row.UUID))
{
profiles[row.UUID] = row;
}
else
{
profiles.Add(row.UUID, row);
}
try try
{ {