[Xfce4-commits] <midori:master> Don't free config_file too early in midori_app_get_crashed

Christian Dywan noreply at xfce.org
Sun Dec 2 16:34:05 CET 2012


Updating branch refs/heads/master
         to bd9823d36291303079747d194f11d0bc2bbd6cf6 (commit)
       from ec63fc7795bf951b92645a96b8014c4649517ae4 (commit)

commit bd9823d36291303079747d194f11d0bc2bbd6cf6
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Dec 2 14:04:25 2012 +0100

    Don't free config_file too early in midori_app_get_crashed
    
    Fixes: https://bugs.launchpad.net/midori/+bug/1085281

 midori/midori-app.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index 495dfd8..db11476 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -825,10 +825,11 @@ midori_app_get_crashed (MidoriApp* app)
            and deleted during normal runtime, but persists in case of a crash. */
         gchar* config_file = midori_paths_get_config_filename_for_writing ("running");
         gboolean crashed = (g_access (config_file, F_OK) == 0);
+        if (!crashed)
+            g_file_set_contents (config_file, "RUNNING", -1, NULL);
         g_free (config_file);
         if (crashed)
             return TRUE;
-        g_file_set_contents (config_file, "RUNNING", -1, NULL);
     }
 
     return FALSE;


More information about the Xfce4-commits mailing list