diff --git a/Logic/Support/Persistence.cs b/Logic/Support/Persistence.cs index c6ffd2ab..3573fe6b 100644 --- a/Logic/Support/Persistence.cs +++ b/Logic/Support/Persistence.cs @@ -11,7 +11,17 @@ namespace Swarmops.Logic.Support { get { return SwarmDb.GetDatabaseForReading().GetKeyValue (key); } - set { SwarmDb.GetDatabaseForWriting().SetKeyValue (key, value); } + set + { + if (value == null) + { + SwarmDb.GetDatabaseForWriting().SetKeyValue(key, "-null-"); // TODO: Delete the key + } + else + { + SwarmDb.GetDatabaseForWriting().SetKeyValue(key, value); + } + } } public static Persistence Key