[nautilus/gnome-2-32] list-view: check for model != NULL before unsetting the highlight



commit 38a9c9e5765fa6b1a051b787031d2cb48e1c1b15
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Sep 20 15:02:02 2010 +0200

    list-view: check for model != NULL before unsetting the highlight
    
    The model could be NULL there as a result of the view being previously
    disposed.

 src/file-manager/fm-list-view.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index d01af6a..3f59959 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2952,6 +2952,13 @@ list_view_notify_clipboard_info (NautilusClipboardMonitor *monitor,
                                  NautilusClipboardInfo *info,
                                  FMListView *view)
 {
+	/* this could be called as a result of _end_loading() being
+	 * called after _dispose(), where the model is cleared.
+	 */
+	if (view->details->model == NULL) {
+		return;
+	}
+
 	if (info != NULL && info->cut) {
 		fm_list_model_set_highlight_for_files (view->details->model, info->files);
 	} else {



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