Skip to content
Snippets Groups Projects
Commit 7605909d authored by Danny Auble's avatar Danny Auble
Browse files

Better checking to make sure structure elements exist

parent 4128047b
No related branches found
No related tags found
No related merge requests found
......@@ -388,7 +388,7 @@ extern int slurm_step_layout_destroy(slurm_step_layout_t *step_layout)
int slurm_step_layout_host_id (slurm_step_layout_t *s, int taskid)
{
int i, j;
if (taskid > s->task_cnt - 1)
if (!s->tasks || !s->tids || (taskid > s->task_cnt - 1))
return SLURM_ERROR;
for (i=0; i < s->node_cnt; i++)
for (j=0; j<s->tasks[i]; j++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment