Explorar el Código

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

Nathalie Furmento hace 5 años
padre
commit
0a33632495
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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)