[Nautilus-list] Fix for crash on progress cancel for gnome-1



Hi,

I stumbled across this one while hacking on the deferred progress dialog
thingy (thanks for your hint darin).
The progress dialog crashes on cancel most of the time because the close
handlers return false instead of true, which causes an implicit destroy
of the dialog by gtk. Now this leads to a segfault in
nautilus_file_operations_progress_done() which operates on an undefined
NautilusFileOperationsProgress pointer.
I noticed this issue is fixed on HEAD by the conversion to gnome-2 (I
guess - no Gnome 2 installed), so basically its a backport of the fix to
the nautilus-gnome-1 branch.

Martin

Index: nautilus-file-operations-progress.c
===================================================================
RCS file:
/cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations-progress.c,v
retrieving revision 1.27
diff -u -r1.27 nautilus-file-operations-progress.c
--- nautilus-file-operations-progress.c	2001/04/13 21:41:22	1.27
+++ nautilus-file-operations-progress.c	2001/12/06 13:21:48
@@ -124,7 +124,7 @@
 static gboolean
 close_callback (GnomeDialog *dialog)
 {
-	return FALSE;
+	return TRUE;
 }
 
 /* GtkObject methods.  */
Index: nautilus-file-operations.c
===================================================================
RCS file:
/cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v
retrieving revision 1.133
diff -u -r1.133 nautilus-file-operations.c
--- nautilus-file-operations.c	2001/10/01 19:44:36	1.133
+++ nautilus-file-operations.c	2001/12/06 13:21:55
@@ -334,10 +334,10 @@
 }
 
 static gboolean
-handle_close_callback (GnomeDialog *dialog, TransferInfo *tranfer_info)
+handle_close_callback (GnomeDialog *dialog, TransferInfo
*transfer_info)
 {
-	tranfer_info->cancelled = TRUE;
-	return FALSE;
+	transfer_info->cancelled = TRUE;
+	return TRUE;
 }
 
 static void









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