Added check to make sure message is not NULL before processing it.
authorIsaac Dooley <idooley2@illinois.edu>
Mon, 14 Sep 2009 18:20:35 +0000 (18:20 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Mon, 14 Sep 2009 18:20:35 +0000 (18:20 +0000)
src/ck-core/ckmessagelogging.C

index 491b3cc76483fdfa383299c4bdd5e97c27b1c4db..887e8c3fdbb1aa25947bd59f6fa3fc62a821da02 100644 (file)
@@ -1234,8 +1234,10 @@ int preProcessReceivedMessage(envelope *env,Chare **objPointer,MlogEntry **logEn
                while(!CqsEmpty(CpvAccess(_outOfOrderMessageQueue))){
                        void *qMsgPtr;
                        CqsDequeue(CpvAccess(_outOfOrderMessageQueue),&qMsgPtr);
-                       envelope *qEnv = (envelope *)qMsgPtr;
-                       CqsEnqueueGeneral((Queue)CpvAccess(CsdSchedQueue),qEnv,CQS_QUEUEING_FIFO,qEnv->getPriobits(),(unsigned int *)qEnv->getPrioPtr());                       
+                       if(qMsgPtr != NULL){
+                         envelope *qEnv = (envelope *)qMsgPtr;
+                         CqsEnqueueGeneral((Queue)CpvAccess(CsdSchedQueue),qEnv,CQS_QUEUEING_FIFO,qEnv->getPriobits(),(unsigned int *)qEnv->getPrioPtr());               
+                       }
        DEBUG(CmiMemoryCheck());
                }
 //             traceUserBracketEvent(25,_startTime,CkWallTimer());