mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
Make conky not crash on exit when using weather objects
This commit is contained in:
parent
758c2ed674
commit
a1f4984a4e
@ -2522,6 +2522,11 @@ void clean_up_without_threads(void *memtofree1, void* memtofree2) {
|
||||
currentconffile = NULL;
|
||||
free_and_zero(memtofree1);
|
||||
free_and_zero(memtofree2);
|
||||
|
||||
#if defined BUILD_WEATHER_METAR || defined BUILD_WEATHER_XOAP
|
||||
weather_free_info();
|
||||
#endif
|
||||
|
||||
timed_thread::destroy_registered_threads();
|
||||
|
||||
free_and_zero(info.cpu_usage);
|
||||
@ -2564,9 +2569,6 @@ void clean_up_without_threads(void *memtofree1, void* memtofree2) {
|
||||
#ifdef BUILD_RSS
|
||||
rss_free_info();
|
||||
#endif
|
||||
#if defined BUILD_WEATHER_METAR || defined BUILD_WEATHER_XOAP
|
||||
weather_free_info();
|
||||
#endif
|
||||
#ifdef BUILD_LUA
|
||||
llua_shutdown_hook();
|
||||
llua_close();
|
||||
|
@ -102,7 +102,7 @@ timed_thread::timed_thread(const std::function<void(thread_handle &)> &start_rou
|
||||
}
|
||||
|
||||
/* destroy a timed thread. */
|
||||
void timed_thread::destroy(bool deregister_this)
|
||||
void timed_thread::destroy()
|
||||
{
|
||||
DBGP("destroying thread %ld", (long)p_timed_thread->thread.get());
|
||||
#ifdef DEBUG
|
||||
@ -125,9 +125,6 @@ void timed_thread::destroy(bool deregister_this)
|
||||
close(p_timed_thread->pipefd[1]);
|
||||
|
||||
running = false;
|
||||
|
||||
if (deregister_this) deregister(this);
|
||||
|
||||
}
|
||||
|
||||
/* lock a timed thread for critical section activity */
|
||||
|
@ -102,7 +102,7 @@ class timed_thread {
|
||||
int test(int override_wait_time);
|
||||
|
||||
/* destroy a timed thread */
|
||||
void destroy(bool deregister_this = true);
|
||||
void destroy();
|
||||
|
||||
/* register a timed thread for destruction */
|
||||
static int register_(const timed_thread_ptr &timed_thread);
|
||||
|
Loading…
Reference in New Issue
Block a user