Browse Source

Fix possible access to `none`

pull/8/head
Anton Tarasenko 3 years ago
parent
commit
3911ebb819
  1. 3
      sources/Data/Database/Local/LocalDatabaseInstance.uc

3
sources/Data/Database/Local/LocalDatabaseInstance.uc

@ -222,7 +222,8 @@ public function DBWriteTask WriteData(JSONPointer pointer, AcediaObject data)
if (!ValidatePointer(pointer, writeTask)) return writeTask; if (!ValidatePointer(pointer, writeTask)) return writeTask;
if (!ValidateRootRecord(writeTask)) return writeTask; if (!ValidateRootRecord(writeTask)) return writeTask;
if (pointer.GetLength() <= 0) { // We can only write JSON array as the root value
if (data != none && pointer.GetLength() <= 0) {
isDataStorable = (data.class == class'AssociativeArray'); isDataStorable = (data.class == class'AssociativeArray');
} }
else { else {

Loading…
Cancel
Save