From 055a4e93e9ed1023af970fa05e5b2b4e5d087685 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 11 Aug 2021 12:02:49 +0100 Subject: [PATCH] POSIX: Set fileHandle to 0 after closing in MemoryMappedFile::openInternal() to prevent it from being closed again in the destructor --- modules/juce_core/native/juce_posix_SharedCode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 831a25cca5..ac7c1990af 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -578,6 +578,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc } close (fileHandle); + fileHandle = 0; } }