[rhythmbox] Bug 592325 - Crashes initialising an iPod Touch



commit b5c11bccf5a3bd0930ec679d22b3ee677188bb79
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Aug 19 14:31:49 2009 +0100

    Bug 592325 - Crashes initialising an iPod Touch
    
    Hide the initialisation dialogue when we can't get
    the iPod device selection.

 plugins/ipod/rb-ipod-helpers.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-helpers.c b/plugins/ipod/rb-ipod-helpers.c
index f45f1c0..e9260fe 100644
--- a/plugins/ipod/rb-ipod-helpers.c
+++ b/plugins/ipod/rb-ipod-helpers.c
@@ -287,7 +287,11 @@ rb_ipod_helpers_show_first_time_dialog (GMount *mount, const char *builder_file)
 
 	/* get model number and name */
 	tree_model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
-	gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+	if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
+		gtk_widget_destroy (dialog);
+		g_free (mountpoint);
+		return FALSE;
+	}
 	gtk_tree_model_get (tree_model, &iter, COL_INFO, &info, -1);
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "name_entry"));
 	ipod_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));



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