brasero r935 - in trunk: . src



Author: philippr
Date: Sun Jun 29 16:23:19 2008
New Revision: 935
URL: http://svn.gnome.org/viewvc/brasero?rev=935&view=rev

Log:
	Fix #539959 Crash when right clicking in plugin window 

	* src/brasero-plugin-manager-ui.c
	(plugin_manager_ui_populate_lists), (create_tree_popup_menu),
	(show_tree_popup_menu), (brasero_plugin_manager_ui_init):
	* src/burn.c (brasero_burn_log):

Modified:
   trunk/ChangeLog
   trunk/src/brasero-plugin-manager-ui.c
   trunk/src/burn.c

Modified: trunk/src/brasero-plugin-manager-ui.c
==============================================================================
--- trunk/src/brasero-plugin-manager-ui.c	(original)
+++ trunk/src/brasero-plugin-manager-ui.c	Sun Jun 29 16:23:19 2008
@@ -369,6 +369,7 @@
 	}
 	g_object_unref (caps);
 
+	plugin = NULL;
 	if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
 	{
 		GtkTreeSelection *selection;
@@ -568,6 +569,9 @@
 
 	plugin = plugin_manager_ui_get_selected_plugin (pm);
 
+	if (!plugin)
+		return NULL;
+
 	menu = gtk_menu_new ();
 
 	item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
@@ -714,6 +718,8 @@
 		gtk_widget_destroy (priv->popup_menu);
 
 	priv->popup_menu = create_tree_popup_menu (pm);
+	if (!priv->popup_menu)
+		return;
 	
 	gtk_menu_attach_to_widget (GTK_MENU (priv->popup_menu),
 				   GTK_WIDGET (pm),
@@ -983,11 +989,8 @@
 		gtk_widget_set_sensitive (priv->about_button, FALSE);
 		gtk_widget_set_sensitive (priv->configure_button, FALSE);		
 	}
-	else {
+	else
 		plugin_manager_ui_populate_lists (pm);
-		gtk_widget_set_sensitive (priv->about_button, TRUE);
-		gtk_widget_set_sensitive (priv->configure_button, TRUE);
-	}
 }
 
 static void

Modified: trunk/src/burn.c
==============================================================================
--- trunk/src/burn.c	(original)
+++ trunk/src/burn.c	Sun Jun 29 16:23:19 2008
@@ -162,9 +162,7 @@
 	va_list arg_list;
 
 	va_start (arg_list, format);
-
 	brasero_burn_session_logv (priv->session, format, arg_list);
-
 	va_end (arg_list);
 }
 



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