X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fupdate_checker.cc;h=6c1217f860b318266e84beb7208e13c07375438a;hb=b1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f;hp=52dfce7f782ce38ef8405f73fdf8337c90c94daa;hpb=0df83d7ba261cdbb5be62db34dae7b972e05ddd9;p=dcpomatic.git diff --git a/src/lib/update_checker.cc b/src/lib/update_checker.cc index 52dfce7f7..6c1217f86 100644 --- a/src/lib/update_checker.cc +++ b/src/lib/update_checker.cc @@ -1,32 +1,32 @@ /* Copyright (C) 2014-2015 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ #include "update_checker.h" #include "version.h" -#include "safe_stringstream.h" -#include "config.h" #include "util.h" #include "raw_convert.h" #include #include #include #include +#include #define BUFFER_SIZE 1024 @@ -85,7 +85,12 @@ UpdateChecker::~UpdateChecker () _condition.notify_all (); if (_thread) { - _thread->join (); + /* Ideally this would be a DCPOMATIC_ASSERT(_thread->joinable()) but we + can't throw exceptions from a destructor. + */ + if (_thread->joinable ()) { + _thread->join (); + } } delete _thread; @@ -152,7 +157,7 @@ UpdateChecker::thread () _stable = stable; } - if (Config::instance()->check_for_test_updates() && version_less_than (dcpomatic_version, test)) { + if (version_less_than (dcpomatic_version, test)) { _test = test; }