servlib/bundling/BPQBlock.cc
changeset 35 2bc8cc69d2a5
parent 33 bf64ebbc6e75
child 37 6023dbd1cef5
--- a/servlib/bundling/BPQBlock.cc	Fri Aug 12 13:00:05 2011 +0100
+++ b/servlib/bundling/BPQBlock.cc	Fri Aug 12 13:55:56 2011 +0100
@@ -182,7 +182,7 @@
         log_debug_p(LOG, "BPQBlock::initialise: b->source() == NULL");
         block = b;
     }
-
+/////////////////////////////////////////////////////
     ASSERT ( block != NULL );
     
     log_debug_p(LOG, "BPQBlock::initialise: block != NULL");
@@ -194,7 +194,17 @@
         (block->complete()) ? "true" : "false" );
     log_debug_p(LOG, "BPQBlock::initialise: reloaded() = %s", 
         (block->reloaded()) ? "true" : "false" );
+////////////////////////////////////////////////////
+    if(block->data() == NULL) {
+        log_debug_p(LOG, "BPQBlock::initialise: block->data() == NULL"); 
 
+        kind_ = KIND_QUERY;
+        matching_rule_ = 1;
+        query_len_ = 0;
+        query_val_ = 0;
+        
+        return BP_FAIL;
+    }
 
     int decoding_len=0; 
     u_int i=0, j=0;