Battery: cleanup code and make detection more resilient

git-svn-id: http://tint2.googlecode.com/svn/trunk@739 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
o9000
2015-03-28 18:08:44 +00:00
committed by mrovi9000@gmail.com
parent e113080a0e
commit 1a41159142
3 changed files with 248 additions and 179 deletions

View File

@@ -166,6 +166,8 @@ void callback_timeout_expired()
void stop_timeout(timeout* t)
{
if (!multi_timeouts || !t)
return;
// if not in the list, it was deleted in callback_timeout_expired
if (g_slist_find(timeout_list, t) || g_hash_table_lookup(multi_timeouts, t)) {
if (t->multi_timeout)