From f22a0b076116a0dc6861be7e46283903cf8dc759 Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Tue, 20 Oct 2009 18:03:16 +0200
Subject: [PATCH] Unset the startup-id data after using it.

Else we use freed data and thus receive a completly
broken startup-id.
---
 thunar/thunar-application.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index 0004a78f7..dc12c08be 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -1071,10 +1071,6 @@ thunar_application_process_files_finish (ThunarBrowser *browser,
   /* determine and the startup id of the file */
   startup_id = g_object_get_qdata (G_OBJECT (file), thunar_application_startup_id_quark);
 
-  /* unset the startup id */
-  if (startup_id != NULL)
-    g_object_set_qdata (G_OBJECT (file), thunar_application_startup_id_quark, NULL);
-
   /* check if resolving/mounting failed */
   if (error != NULL)
     {
@@ -1109,6 +1105,10 @@ thunar_application_process_files_finish (ThunarBrowser *browser,
           thunar_application_process_files (application);
         }
     }
+
+  /* unset the startup id */
+  if (startup_id != NULL)
+    g_object_set_qdata (G_OBJECT (file), thunar_application_startup_id_quark, NULL);
 }
 
 
-- 
GitLab