fixed segfault when remove desktop with task
git-svn-id: http://tint2.googlecode.com/svn/trunk@443 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
1a9ce9decd
commit
46168f6727
1 changed files with 4 additions and 5 deletions
|
@ -224,7 +224,10 @@ Task *task_get_task (Window win)
|
||||||
|
|
||||||
GPtrArray* task_get_tasks(Window win)
|
GPtrArray* task_get_tasks(Window win)
|
||||||
{
|
{
|
||||||
return g_hash_table_lookup(win_to_task_table, &win);
|
if (win_to_task_table)
|
||||||
|
return g_hash_table_lookup(win_to_task_table, &win);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -236,10 +239,6 @@ void task_refresh_tasklist ()
|
||||||
win = server_get_property (server.root_win, server.atom._NET_CLIENT_LIST, XA_WINDOW, &num_results);
|
win = server_get_property (server.root_win, server.atom._NET_CLIENT_LIST, XA_WINDOW, &num_results);
|
||||||
if (!win) return;
|
if (!win) return;
|
||||||
|
|
||||||
// Remove any old and set active win
|
|
||||||
// remark from Andreas: This seems unneccessary...
|
|
||||||
// active_task();
|
|
||||||
|
|
||||||
GList* win_list = g_hash_table_get_keys(win_to_task_table);
|
GList* win_list = g_hash_table_get_keys(win_to_task_table);
|
||||||
GList* it;
|
GList* it;
|
||||||
for (it=win_list; it; it=it->next) {
|
for (it=win_list; it; it=it->next) {
|
||||||
|
|
Loading…
Reference in a new issue