evolution r35951 - trunk/mail



Author: sragavan
Date: Mon Aug 11 06:28:32 2008
New Revision: 35951
URL: http://svn.gnome.org/viewvc/evolution?rev=35951&view=rev

Log:
2008-08-11  Srinivasa Ragavan  <sragavan novell com>

	* mail/message-list.c: Don't use uninitialized exception. It leads to
	freeing uninitialized memory.


Modified:
   trunk/mail/ChangeLog
   trunk/mail/message-list.c

Modified: trunk/mail/message-list.c
==============================================================================
--- trunk/mail/message-list.c	(original)
+++ trunk/mail/message-list.c	Mon Aug 11 06:28:32 2008
@@ -4076,9 +4076,15 @@
 				m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject);
 		} else {
 			m->summary = g_ptr_array_new ();
-			if (showuids->len != camel_folder_summary_cache_size (m->folder->summary) ) {
-			    CamelException ex;
+			if (showuids->len > camel_folder_summary_cache_size (m->folder->summary) ) {
+				CamelException ex;
+				camel_exception_init (&ex);
 				camel_folder_summary_reload_from_db (m->folder->summary, &ex);
+				if (camel_exception_is_set (&ex)) {
+					g_warning ("Exception while reloading: %s\n", camel_exception_get_description (&ex));
+					camel_exception_clear (&ex);
+				}
+
 			}
 			for (i = 0; i < showuids->len; i++) {
 				info = camel_folder_get_message_info (m->folder, showuids->pdata[i]);



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