소스 검색

src/core/jobs.c: _starpu_get_model_name(j) return NULL if j=NULL

Nathalie Furmento 14 년 전
부모
커밋
283f137057
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/core/jobs.c

+ 3 - 1
src/core/jobs.c

@@ -352,7 +352,9 @@ int _starpu_push_local_task(struct starpu_worker_s *worker, struct starpu_job_s
 }
 
 const char *_starpu_get_model_name(starpu_job_t j) {
-        struct starpu_task *task = j->task;
+	if (!j) return NULL;
+
+	struct starpu_task *task = j->task;
         if (task && task->cl
             && task->cl->model
             && task->cl->model->symbol)