From: Arnaud Giersch Date: Mon, 2 Dec 2013 09:08:32 +0000 (+0100) Subject: Don't read mouse status when condition is reached by termination. X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/graphlib.git/commitdiff_plain/731920852b16f59be2e9e00f11470d23003b5ea4 Don't read mouse status when condition is reached by termination. --- diff --git a/DrawingWindow.cpp b/DrawingWindow.cpp index 1ab14ee..7015d6a 100644 --- a/DrawingWindow.cpp +++ b/DrawingWindow.cpp @@ -669,7 +669,7 @@ bool DrawingWindow::waitMousePress(int &x, int &y, int &button, if (terminateThread) { pressed = false; } else { - pressed = mouseCondition.wait(&mouseMutex, time); + pressed = mouseCondition.wait(&mouseMutex, time) && !terminateThread; if (pressed) { x = mousePos.x(); y = mousePos.y();