This commit is contained in:
The Arrayser 2022-08-29 16:41:13 +02:00 committed by GitHub
parent 3466a55c41
commit fe4260e8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,10 +118,12 @@ void * sus_fileFileToMemroy(sus_File file){
} }
void sus_fileClose(sus_File file){ void sus_fileClose(sus_File file){
FlushViewOfFile(file->memroy, 0); if(file->memroy == NULL){
UnmapViewOfFile(file->memroy); FlushViewOfFile(file->memroy, 0);
CloseHandle(file->fileMapHandle); UnmapViewOfFile(file->memroy);
CloseHandle(file->fileHandle); CloseHandle(file->fileMapHandle);
CloseHandle(file->fileHandle);
}
sus_heapFree(file); sus_heapFree(file);
} }