[gnome-autoar] AutoarCreate: Fix segmentation fault when output_is_dest is set



commit a3a10d4929facdc19be70a6726248e5fa4826f87
Author: Ting-Wei Lan <lantw44 gmail com>
Date:   Sun Sep 15 01:41:32 2013 +0800

    AutoarCreate: Fix segmentation fault when output_is_dest is set

 gnome-autoar/autoar-create.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gnome-autoar/autoar-create.c b/gnome-autoar/autoar-create.c
index 4606c74..8e2ddb1 100644
--- a/gnome-autoar/autoar-create.c
+++ b/gnome-autoar/autoar-create.c
@@ -1310,7 +1310,14 @@ static void
 autoar_create_step_decide_dest_already (AutoarCreate *arcreate)
 {
   /* Alternative step 1: Output is destination */
+
+  char *output_basename;
   arcreate->priv->dest = g_object_ref (arcreate->priv->output_file);
+  output_basename = g_file_get_basename (arcreate->priv->output_file);
+  arcreate->priv->source_basename_noext =
+    autoar_common_get_basename_remove_extension (output_basename);
+  g_free (output_basename);
+
   autoar_create_signal_decide_dest (arcreate);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]