]> Dogcows Code - chaz/tint2/commitdiff
fixed segfault when remove desktop with task
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Tue, 4 May 2010 16:39:22 +0000 (16:39 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Tue, 4 May 2010 16:39:22 +0000 (16:39 +0000)
src/taskbar/taskbar.c

index ab6b11d3f029fdf3a7a3354b01a84f9002263d43..4bf6db5d095dd27ced81aa729b50033976b3e994 100644 (file)
@@ -224,7 +224,10 @@ Task *task_get_task (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);
        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* it;
        for (it=win_list; it; it=it->next) {
This page took 0.02221 seconds and 4 git commands to generate.