Bug fix. Avoiding the use of a null pointer when migration constructor is used.
authorEsteban Meneses <emenese2@illinois.edu>
Thu, 5 Apr 2012 16:32:53 +0000 (11:32 -0500)
committerEsteban Meneses <emenese2@illinois.edu>
Thu, 5 Apr 2012 16:32:53 +0000 (11:32 -0500)
src/ck-core/ckarray.C

index 65dd8a1eb64c85b9cdeb1d21e712db1882088d04..e21b68eb219f82663bb6c507b56c1aaaaddaa039 100644 (file)
@@ -267,8 +267,10 @@ void ArrayElement::initBasics(void)
                          l->ckElementCreating(this));
   }
 #if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
-        mlogData->objID.type = TypeArray;
-        mlogData->objID.data.array.id = (CkGroupID)thisArrayID;
+       if(mlogData == NULL)
+               mlogData = new ChareMlogData();
+       mlogData->objID.type = TypeArray;
+       mlogData->objID.data.array.id = (CkGroupID)thisArrayID;
 #endif
 #ifdef _PIPELINED_ALLREDUCE_
        allredMgr = NULL;