Checker: Access workload element 0 only if there is an element 0.
authorGabe Black <gblack@eecs.umich.edu>
Tue, 7 Feb 2012 12:44:01 +0000 (04:44 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Tue, 7 Feb 2012 12:44:01 +0000 (04:44 -0800)
src/cpu/checker/cpu.cc

index c905c62eb5c115b486eadc80607e8c9cf55213e7..372d00c6ff6ede92ad35b6d832ffe50582cb97a9 100644 (file)
@@ -84,7 +84,8 @@ CheckerCPU::CheckerCPU(Params *p)
     systemPtr = NULL;
     workload = p->workload;
     // XXX: This is a hack to get this to work some
-    thread = new SimpleThread(this, /* thread_num */ 0, workload[0], itb, dtb);
+    thread = new SimpleThread(this, /* thread_num */ 0,
+            workload.size() ? workload[0] : NULL, itb, dtb);
 
     tc = thread->getTC();
     threadContexts.push_back(tc);