Blob Blame History Raw
From 0aafb5a5c47213c5072a701f96ae82a910e7de09 Mon Sep 17 00:00:00 2001
From: Marty Jack <martyj@linux.local>
Date: Fri, 19 Mar 2010 22:46:23 -0400
Subject: [PATCH 21/23] Race condition in task deletion, urgency timer could fire after structure deleted
 Fedora bug 554174, 573172

---
 src/plugins/taskbar.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/taskbar.c b/src/plugins/taskbar.c
index a82286a..d6a1d71 100644
--- a/src/plugins/taskbar.c
+++ b/src/plugins/taskbar.c
@@ -549,15 +549,15 @@ static void task_delete(TaskbarPlugin * tb, Task * tk, gboolean unlink)
     if (tb->focused == tk)
         tb->focused = NULL;
 
+    /* If there is an urgency timeout, remove it. */
+    if (tk->flash_timeout != 0)
+        g_source_remove(tk->flash_timeout);
+
     /* Deallocate structures. */
     icon_grid_remove(tb->icon_grid, tk->button);
     task_free_names(tk);
     task_unlink_class(tk);
 
-    /* If there is an urgency timeout, remove it. */
-    if (tk->flash_timeout != 0)
-        g_source_remove(tk->flash_timeout);
-
     /* If requested, unlink the task from the task list.
      * If not requested, the caller will do this. */
     if (unlink)
-- 
1.6.6.1