Index: camel-index.c
===================================================================
--- camel-index.c	(revision 7953)
+++ camel-index.c	(working copy)
@@ -183,7 +183,7 @@
 {
 	g_return_val_if_fail (CAMEL_IS_INDEX (idx), FALSE);
 	
-	if ((idx->state & CAMEL_INDEX_DELETED) == 0)
+	if (idx && ((idx->state & CAMEL_INDEX_DELETED) == 0))
 		return CI_CLASS(idx)->has_name(idx, name);
 	else
 		return FALSE;
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 7953)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2007-08-16  Lucky Wankhede  <wlakke@novell.com>
+
+	** Fix for bug #339602
+
+	* camel-index.c: Check for if idx is null.
+
 2007-08-13  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #352346
