diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index b885f2a..b03e44e 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -83,9 +83,13 @@ BitmapHeapNext(BitmapHeapScanState *node)
 	TBMIterateResult *tbmres;
 	OffsetNumber targoffset;
 	TupleTableSlot *slot;
-	ParallelBitmapHeapState *pstate = node->pstate;
+	ParallelBitmapHeapState *pstate = NULL;
 	dsa_area   *dsa = node->ss.ps.state->es_query_dsa;
 
+	/* if DSA is NULL then go for non-parallel mode */
+	if (dsa != NULL)
+		pstate = node->pstate;
+
 	/*
 	 * extract necessary information from index scan node
 	 */
