浏览代码

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)