From 85d9a52deeb98362480770aa69c60c0c355d7ccd Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 15 May 2022 11:37:15 -0500 Subject: [PATCH] fix potential hangs in saveFur again --- src/engine/fileOps.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/fileOps.cpp b/src/engine/fileOps.cpp index c63601a4f..feae353d3 100644 --- a/src/engine/fileOps.cpp +++ b/src/engine/fileOps.cpp @@ -2669,16 +2669,19 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) { if (song.ins.size()>256) { logE("maximum number of instruments is 256!"); lastError="maximum number of instruments is 256"; + saveLock.unlock(); return NULL; } if (song.wave.size()>256) { logE("maximum number of wavetables is 256!"); lastError="maximum number of wavetables is 256"; + saveLock.unlock(); return NULL; } if (song.sample.size()>256) { logE("maximum number of samples is 256!"); lastError="maximum number of samples is 256"; + saveLock.unlock(); return NULL; }