]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] initialize debug_buffer_path when --debug but no plymouth:debug
authorRay Strode <rstrode@redhat.com>
Mon, 24 Aug 2009 17:44:48 +0000 (13:44 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 24 Aug 2009 17:46:12 +0000 (13:46 -0400)
Before it wasn't ever getting set, causing crashes with --debug
in some cases.

src/main.c

index 3ede8effa0674c5de7e205ff1480f21be17009ca..d3f8ebb2dade77b583b604b505fab17e4e04b77f 100644 (file)
@@ -1144,9 +1144,6 @@ check_verbosity (state_t *state)
           debug_buffer_path = path;
         }
 
-        if (debug_buffer_path == NULL)
-          debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
-
         if (debug_buffer != NULL)
           debug_buffer = ply_buffer_new ();
 
@@ -1160,6 +1157,9 @@ check_verbosity (state_t *state)
 
   if (debug_buffer != NULL)
     {
+      if (debug_buffer_path == NULL)
+        debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
+
       ply_logger_add_filter (ply_logger_get_error_default (),
                              (ply_logger_filter_handler_t)
                              on_error_message,