ソースを参照

src/core/tree.c: fix for function starpu_tree_get_neighbour()
- check there is a higher level before going there

Nathalie Furmento 5 年 前
コミット
0a33632495
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3 1
      src/core/tree.c

+ 3 - 1
src/core/tree.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2014,2015                                Inria
- * Copyright (C) 2014-2017                                CNRS
+ * Copyright (C) 2014-2017, 2019                          CNRS
  * Copyright (C) 2014,2016                                Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -110,6 +110,8 @@ struct starpu_tree* starpu_tree_get_neighbour(struct starpu_tree *tree, struct s
 
 	int st, n;
 
+	if (father == NULL) return NULL;
+
 	for(st = 0; st < father->arity; st++)
 	{
 		if(&father->nodes[st] == node)