[anjal] First partial git-commit. Fixes a crash on fast folder switch. Ref



commit 283a2ba6a363f64f236ab0ea5e690a1564de6424
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Mon Mar 23 17:42:56 2009 +0530

    First partial git-commit. Fixes a crash on fast folder switch. Ref
    folders well.
---
 src/mail-folder-view.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/mail-folder-view.c b/src/mail-folder-view.c
index 6dfc2d5..a0e9ff4 100644
--- a/src/mail-folder-view.c
+++ b/src/mail-folder-view.c
@@ -212,9 +212,10 @@ mail_folder_view_finalize (GObject *object)
 {
 	 MailFolderView *mfv = (MailFolderView  *)object;
 	 
-	 g_object_unref (mfv->model);
 	 if (mfv->priv->folder)
-		  camel_object_unref (mfv->priv->folder);
+		  camel_object_unref (mfv->priv->folder);	 
+	 g_object_unref (mfv->model);
+
 	 g_free (mfv->priv->uri);
 	 g_free (mfv->priv);
 	G_OBJECT_CLASS (mail_folder_view_parent_class)->finalize (object);
@@ -312,13 +313,8 @@ mfv_got_folder(char *uri, CamelFolder *folder, void *data)
 		}
 	}
 	
-
-	m = mail_msg_new (&db_read_info);
-	m->mfv = mfv;
-	m->uri = g_strdup(uri);
-	m->folder = folder;
-	m->done = mail_folder_view_set_folder;
-	mail_msg_unordered_push (m);	
+	camel_object_ref(folder);
+	mfv_db_load (mfv, uri, folder);
 }
 
 void



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