diff --git a/setup/Setup.cpp b/setup/Setup.cpp index 69c3a6a1a..69c4aa2d6 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -840,14 +840,16 @@ void CampoSetup::NormalSetup() bool CampoSetup::CampoRunning(const wxString& strAppName, const wxString& strMsg) const { - bool ok = false; wxSingleInstanceChecker sicProgram(strAppName); - if (sicProgram.IsAnotherRunning()) - { + + int i; + for (i = 3; i > 0 && sicProgram.IsAnotherRunning(); i--) + wxSleep(1); + + if (i <= 0) ErrorBox(strMsg); - ok = true; - } - return ok; + + return i <= 0; }