Fix NULL ptr reference of se->relevance
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 17 Apr 2013 11:28:51 +0000 (13:28 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 17 Apr 2013 11:34:40 +0000 (13:34 +0200)
If a new search is initiated and a CCL query fails to parse,
then session->relevance becomes NULL.

src/session.c

index 5e39968..5ad2694 100644 (file)
@@ -1675,7 +1675,7 @@ int ingest_record(struct client *cl, const char *rec,
         return -1;
     }
     session_enter(se, "ingest_record");
-    if (client_get_session(cl) == se)
+    if (client_get_session(cl) == se && se->relevance)
         ret = ingest_to_cluster(cl, xdoc, root, record_no, mergekey_norm);
     session_leave(se, "ingest_record");