diff --git a/lib/src/kdbx_object.dart b/lib/src/kdbx_object.dart index bd92ab8..6585017 100644 --- a/lib/src/kdbx_object.dart +++ b/lib/src/kdbx_object.dart @@ -98,7 +98,8 @@ abstract class KdbxObject extends KdbxNode { if (dirty) { times.modifiedNow(); if (/*!isDirty && */ dirty) { - file.dirtyObject(this); + // during initial `create` the file will be null. + file?.dirtyObject(this); } } super.isDirty = dirty;