diff --git a/vcl/source/app/watchdog.cxx b/vcl/source/app/watchdog.cxx index bd8b28db89e6..c45e51c04194 100644 --- a/vcl/source/app/watchdog.cxx +++ b/vcl/source/app/watchdog.cxx @@ -114,6 +114,15 @@ void WatchdogThread::execute() gpWatchdogExit->wait(&aQuarterSecond); +#if defined HAVE_VALGRIND_HEADERS + if (RUNNING_ON_VALGRIND) + continue; +#endif +#if defined DBG_UTIL + if (comphelper::isDebuggerAttached()) + continue; +#endif + #if HAVE_FEATURE_OPENGL WatchdogHelper::check(); #endif @@ -130,14 +139,6 @@ void WatchdogThread::start() return; // already running if (getenv("SAL_DISABLE_WATCHDOG")) return; -#if defined HAVE_VALGRIND_HEADERS - if (RUNNING_ON_VALGRIND) - return; -#endif -#if defined DBG_UTIL - if (comphelper::isDebuggerAttached()) - return; -#endif gpWatchdogExit = new osl::Condition(); gxWatchdog.set(new WatchdogThread()); gxWatchdog->launch();