make asterix tests pass

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_job_rewriter@2971 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
index 573f105..b81928b 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
@@ -347,6 +347,8 @@
         }
         Queue<IActivity> tbeQueue = toBeExpendedMap.get(superActivityId);
         Queue<IActivity> existingTbeQueque = toBeExpendedMap.remove(existingSuperActivityId);
-        tbeQueue.addAll(existingTbeQueque);
+        if (existingTbeQueque != null) {
+            tbeQueue.addAll(existingTbeQueque);
+        }
     }
 }