1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 13:04:29 +00:00

Fail gracefully if unable to open the opencl files.

This commit is contained in:
Con Kolivas 2011-08-25 13:10:53 +10:00
parent 1c5ab073ec
commit 48180b697b

3
ocl.c
View File

@ -367,6 +367,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char *source, *rawsource = file_contents(filename, &pl);
size_t sourceSize[] = {(size_t)pl};
if (!rawsource)
return NULL;
source = malloc(pl);
if (!source) {
applog(LOG_ERR, "Unable to malloc source");