From c236c89d25c35cbb6e7b9ef3777ebd728017c4f3 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 29 Jul 2014 15:13:04 +0400 Subject: [PATCH] Fix the LongOp "isPerformed" method execution --- src/Events/Events_LongOp.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Events/Events_LongOp.cpp b/src/Events/Events_LongOp.cpp index ebfeb5677..7cc46c3cd 100644 --- a/src/Events/Events_LongOp.cpp +++ b/src/Events/Events_LongOp.cpp @@ -26,14 +26,16 @@ Events_ID Events_LongOp::errorID() void Events_LongOp::start(void* theSender) { - if (MY_SENDERS.empty()) { - Events_LongOp anError(theSender); - Events_Loop::loop()->send(anError); - } + bool toSend = MY_SENDERS.empty(); if (MY_SENDERS.find(theSender) == MY_SENDERS.end()) MY_SENDERS[theSender] = 1; else MY_SENDERS[theSender]++; + + if (toSend) { + Events_LongOp anError(theSender); + Events_Loop::loop()->send(anError); + } } void Events_LongOp::end(void* theSender) -- 2.39.2