Initialize CheckUpdate process only in GUI mode.

E.g. If the program is executed with --help we don't need to
check for updates.
This commit is contained in:
David Capello 2012-08-23 23:51:27 -03:00
parent fb5f086f0f
commit df48deaef8

View File

@ -148,10 +148,6 @@ App::App(int argc, char* argv[])
int App::run() int App::run()
{ {
#ifdef ENABLE_UPDATER
app::CheckUpdateThreadLauncher checkUpdate;
#endif
// Initialize GUI interface // Initialize GUI interface
if (isGui()) { if (isGui()) {
PRINTF("GUI mode\n"); PRINTF("GUI mode\n");
@ -223,6 +219,7 @@ int App::run()
#ifdef ENABLE_UPDATER #ifdef ENABLE_UPDATER
// Launch the thread to check for updates. // Launch the thread to check for updates.
app::CheckUpdateThreadLauncher checkUpdate;
checkUpdate.launch(); checkUpdate.launch();
#endif #endif