diff --git a/reactos/ntoskrnl/fsrtl/filelock.c b/reactos/ntoskrnl/fsrtl/filelock.c index 848e7467f42..6fe7bfd053f 100644 --- a/reactos/ntoskrnl/fsrtl/filelock.c +++ b/reactos/ntoskrnl/fsrtl/filelock.c @@ -858,7 +858,10 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock, Find.Exclusive.FileLock.StartingByte = *FileOffset; Find.Exclusive.FileLock.EndingByte.QuadPart = FileOffset->QuadPart + Length->QuadPart; - ASSERT(InternalInfo); + if (!InternalInfo) { + DPRINT("File not previously locked (ever)\n"); + return STATUS_RANGE_NOT_LOCKED; + } Entry = RtlLookupElementGenericTable(&InternalInfo->RangeTable, &Find); if (!Entry) { DPRINT("Range not locked %wZ\n", &FileObject->FileName);