From aecff24add56e6724744928efe5ad7f1947416b7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 28 Feb 2012 16:44:36 +0000 Subject: Cycles: extra OpenCL NULL point check, maybe avoids some crashes. Don't think this should ever happen in practice but maybe it does anyway. --- intern/cycles/util/util_opencl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'intern/cycles/util') diff --git a/intern/cycles/util/util_opencl.cpp b/intern/cycles/util/util_opencl.cpp index 1d05b0b687a..4087c2c3823 100644 --- a/intern/cycles/util/util_opencl.cpp +++ b/intern/cycles/util/util_opencl.cpp @@ -235,6 +235,9 @@ int clLibraryInit() __clewEnqueueBarrier = (PFNCLENQUEUEBARRIER )CLCC_DYNLIB_IMPORT(module, "clEnqueueBarrier"); __clewGetExtensionFunctionAddress = (PFNCLGETEXTENSIONFUNCTIONADDRESS )CLCC_DYNLIB_IMPORT(module, "clGetExtensionFunctionAddress"); + if(__clewGetPlatformIDs == NULL) + return 0; + return 1; } -- cgit v1.2.3