--- epiphany.py.orig	2008-03-11 09:14:12.000000000 +0100
+++ epiphany.py	2008-03-11 09:08:14.000000000 +0100
@@ -149,9 +149,10 @@
         self._history = EpiphanyHistoryParser(self, favicon_cache).get_indexer()
             
     def query(self, query):
-        matches = self._history.look_up(query)[:deskbar.DEFAULT_RESULTS_PER_HANDLER]
-        self.set_priority_for_matches( matches )
-        self._emit_query_ready(query, matches )
+        if self._history:
+           matches = self._history.look_up(query)[:deskbar.DEFAULT_RESULTS_PER_HANDLER]
+           self.set_priority_for_matches( matches )
+           self._emit_query_ready(query, matches )
         
 class EpiphanyBookmarksParser(xml.sax.ContentHandler):
     def __init__(self, handler, cache):
