Browse Source

Fail gracefully if unable to open the opencl files.

nfactor-troky
Con Kolivas 14 years ago
parent
commit
48180b697b
  1. 3
      ocl.c

3
ocl.c

@ -367,6 +367,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) @@ -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");

Loading…
Cancel
Save