Re: [PATCH] list view crasher (#151493)



On Fri, 2004-09-03 at 04:18 +0200, Martin Wehner wrote:
> I had a look at the crasher I introduced with my patch for #143830, and
> fortunately the fix is pretty simple: gtk_cell_editable_editing_done()
> must not be called if the model was NULLed already (doh!). This is the
> case when fm_clear_list_view() is called during the view destruction.
> I did some testing and if it looks ok to the maintainers, I'll request a
> freeze break.

Just to make sure the release team sees this in time I'll cc them on
this mail.

Here is the patch in question. Is it ok to check in?

Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.227
diff -u -p -r1.227 fm-list-view.c
--- src/file-manager/fm-list-view.c	18 Aug 2004 22:53:34 -0000	1.227
+++ src/file-manager/fm-list-view.c	3 Sep 2004 01:20:34 -0000
@@ -1280,18 +1280,18 @@ fm_list_view_clear (FMDirectoryView *vie
 
 	list_view = FM_LIST_VIEW (view);
 
-	/* Stop an ongoing rename to commit the name changes when the user
-	 * changes directories without exiting cell edit mode. It also prevents
-	 * the edited handler from being called on the cleared list model.
-	 */
+	if (list_view->details->model != NULL) {
+		/* Stop an ongoing rename to commit the name changes when the user
+		 * changes directories without exiting cell edit mode. It also prevents
+		 * the edited handler from being called on the cleared list model.
+		 */
 
-	column = list_view->details->file_name_column;
-	if (column != NULL && column->editable_widget != NULL &&
-		GTK_IS_CELL_EDITABLE (column->editable_widget)) {
-		gtk_cell_editable_editing_done (column->editable_widget);
-	}
+		column = list_view->details->file_name_column;
+		if (column != NULL && column->editable_widget != NULL &&
+			GTK_IS_CELL_EDITABLE (column->editable_widget)) {
+			gtk_cell_editable_editing_done (column->editable_widget);
+		}
 
-	if (list_view->details->model != NULL) {
 		fm_list_model_clear (list_view->details->model);
 	}
 }



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a notorious guitar-strumming cat burglar with acid for blood. She's a 
blind blonde museum curator with the power to see death. They fight crime! 




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