[brasero] Fix #608719 - nautilus crashed with signal 5 in brasero_burn_caps_get_default()
- From: Philippe Rouquier <philippr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Fix #608719 - nautilus crashed with signal 5 in brasero_burn_caps_get_default()
- Date: Wed, 24 Feb 2010 13:42:48 +0000 (UTC)
commit ebc56ba734ce701ba120c7e0322f01aeebe91982
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Wed Feb 24 14:37:16 2010 +0100
Fix #608719 - nautilus crashed with signal 5 in brasero_burn_caps_get_default()
nautilus/nautilus-burn-extension.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/nautilus/nautilus-burn-extension.c b/nautilus/nautilus-burn-extension.c
index e124c78..ae4a072 100644
--- a/nautilus/nautilus-burn-extension.c
+++ b/nautilus/nautilus-burn-extension.c
@@ -265,6 +265,8 @@ write_activate (GtkWindow *toplevel)
if (nautilus_disc_burn_is_empty (toplevel))
return;
+ ensure_initialized ();
+
track = brasero_track_data_cfg_new ();
brasero_track_data_cfg_add (track, BURN_URI, NULL);
@@ -433,6 +435,8 @@ check_disc_activate_cb (NautilusMenuItem *item,
{
BraseroSumDialog *dialog;
+ ensure_initialized ();
+
dialog = brasero_sum_dialog_new ();
tool_dialog_run (BRASERO_TOOL_DIALOG (dialog),
GTK_WINDOW (user_data),
@@ -504,7 +508,12 @@ drive_is_cd_device (GDrive *gdrive)
DEBUG_PRINT ("Got device: %s\n", device);
- monitor = brasero_medium_monitor_get_default ();
+ /* FIXME: since we call the monitor, the library should be initialized.
+ * To avoid all the initializing we'll be able to use the new GIO API
+ * (#594649 - Have a way to detect optical drives) */
+ ensure_initialized();
+
+ monitor = brasero_medium_monitor_get_default ();
drive = brasero_medium_monitor_get_drive (monitor, device);
g_object_unref (monitor);
g_free (device);
@@ -620,7 +629,10 @@ nautilus_disc_burn_get_file_items (NautilusMenuProvider *provider,
BraseroMedia media;
BraseroTrackType *type;
- ensure_initialized();
+ /* Reminder: the following is not needed since it is already
+ * called in drive_is_cd_device ().
+ * ensure_initialized();
+ */
device_path = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
monitor = brasero_medium_monitor_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]