From: Gabe Black Date: Tue, 7 Feb 2012 12:44:01 +0000 (-0800) Subject: Checker: Access workload element 0 only if there is an element 0. X-Git-Tag: stable_2012_06_28~255 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6246bb047a0527590519c35a5ffbd660c680991;p=gem5.git Checker: Access workload element 0 only if there is an element 0. --- diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc index c905c62eb..372d00c6f 100644 --- a/src/cpu/checker/cpu.cc +++ b/src/cpu/checker/cpu.cc @@ -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);