From 9802287b5890d9b2cc250adba1b9810657a95c9c Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 18 Dec 2015 23:55:58 +0000
Subject: [PATCH] some fixes

---
 src/cuda.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/cuda.c b/src/cuda.c
index e95feff..d773d0b 100644
--- a/src/cuda.c
+++ b/src/cuda.c
@@ -67,6 +67,7 @@
         status = cudaMemcpy(x_gpu, x, size, cudaMemcpyHostToDevice);
         check_error(status);
     }
+    if(!x_gpu) error("Cuda malloc failed\n");
     return x_gpu;
 }
 

--
Gitblit v1.10.0