From fcaef73769272be0d0bd5a4d2417bac94c8c8eba Mon Sep 17 00:00:00 2001 From: Don HO Date: Wed, 2 Oct 2019 02:56:06 +0200 Subject: [PATCH] Fix macro playback crash issue The crash issue is due to a mutex locked twice which should be a dead lock but a "device or resource busy" exception is lauched: https://stackoverflow.com/questions/16664375/why-locking-a-stdmutex-doesnt-block-the-thread From 7.8 the standard mutex is used, that changes the behaviour. --- PowerEditor/src/NppCommands.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 76b80fed2..db157a6cc 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -47,8 +47,6 @@ std::mutex command_mutex; void Notepad_plus::macroPlayback(Macro macro) { - std::lock_guard lock(command_mutex); - _playingBackMacro = true; _pEditView->execute(SCI_BEGINUNDOACTION);