brasero r818 - in trunk: . src



Author: philippr
Date: Sun May 18 18:43:37 2008
New Revision: 818
URL: http://svn.gnome.org/viewvc/brasero?rev=818&view=rev

Log:
	Fix #533148 â crash when adding files (only x86_64?)
	patch by Eric Piel_gnome

	* src/brasero-data-project.c
	(brasero_data_project_uri_remove_graft):
	* src/brasero-utils.c (brasero_utils_register_string),
	(brasero_utils_unregister_string):

Modified:
   trunk/ChangeLog
   trunk/src/brasero-data-project.c
   trunk/src/brasero-utils.c

Modified: trunk/src/brasero-data-project.c
==============================================================================
--- trunk/src/brasero-data-project.c	(original)
+++ trunk/src/brasero-data-project.c	Sun May 18 18:43:37 2008
@@ -810,8 +810,8 @@
 
 	g_hash_table_lookup_extended (priv->grafts,
 				      uri,
-				      (gpointer) &key,
-				      (gpointer) &graft);
+				      (gpointer *) &key,
+				      (gpointer *) &graft);
 
 	/* Put the nodes in ungrafted state */
 	for (iter = graft->nodes; iter; iter = next) {

Modified: trunk/src/brasero-utils.c
==============================================================================
--- trunk/src/brasero-utils.c	(original)
+++ trunk/src/brasero-utils.c	Sun May 18 18:43:37 2008
@@ -146,7 +146,7 @@
 brasero_utils_register_string (const gchar *string)
 {
 	gboolean success;
-	gpointer key;
+	gpointer key, reftmp;
 	guint ref;
 
 	if (!string) {
@@ -164,7 +164,7 @@
 		success = g_hash_table_lookup_extended (stringsH,
 							string,
 							&key,
-							(gpointer) &ref);
+							&reftmp);
 
 	if (!success) {
 		key = g_strdup (string);
@@ -175,7 +175,7 @@
 		return key;
 	}
 
-	ref ++;
+	ref = GPOINTER_TO_INT(reftmp) + 1;
 	g_hash_table_insert (stringsH,
 			     key,
 			     GINT_TO_POINTER (ref));
@@ -188,7 +188,7 @@
 brasero_utils_unregister_string (const gchar *string)
 {
 	gboolean success;
-	gpointer key;
+	gpointer key, reftmp;
 	guint ref;
 
 	if (!string) {
@@ -206,13 +206,13 @@
 	success = g_hash_table_lookup_extended (stringsH,
 						string,
 						&key,
-						(gpointer) &ref);
+						&reftmp);
 	if (!success) {
 		G_UNLOCK (strings_mutex);
 		return;
 	}
 
-	ref --;
+	ref = GPOINTER_TO_INT(reftmp) - 1;
 
 	if (ref > 0)
 		g_hash_table_insert (stringsH, key, GINT_TO_POINTER (ref));



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