Browse Source

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

Nathalie Furmento 14 years ago
parent
commit
283f137057
1 changed files with 3 additions and 1 deletions
  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)