Browse Source

Fix crash when writing back to main memory requires allocating data there

Samuel Thibault 12 years ago
parent
commit
21331075a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/datawizard/copy_driver.c

+ 1 - 1
src/datawizard/copy_driver.c

@@ -354,7 +354,7 @@ int __attribute__((warn_unused_result)) _starpu_driver_copy_data_1_to_1(starpu_d
 		if (!may_alloc)
 			return -ENOMEM;
 
-		ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate,req->prefetch);
+		ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate, req ? req->prefetch : 0);
 		if (ret_alloc)
 			return -ENOMEM;
 	}