[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44519] trunk/blender/intern/cycles/util/ util_opencl.cpp: Cycles: extra OpenCL NULL point check, maybe avoids some crashes.

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Feb 28 17:44:37 CET 2012


Revision: 44519
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44519
Author:   blendix
Date:     2012-02-28 16:44:36 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Cycles: extra OpenCL NULL point check, maybe avoids some crashes. Don't think
this should ever happen in practice but maybe it does anyway.

Modified Paths:
--------------
    trunk/blender/intern/cycles/util/util_opencl.cpp

Modified: trunk/blender/intern/cycles/util/util_opencl.cpp
===================================================================
--- trunk/blender/intern/cycles/util/util_opencl.cpp	2012-02-28 16:29:48 UTC (rev 44518)
+++ trunk/blender/intern/cycles/util/util_opencl.cpp	2012-02-28 16:44:36 UTC (rev 44519)
@@ -235,6 +235,9 @@
     __clewEnqueueBarrier                = (PFNCLENQUEUEBARRIER              )CLCC_DYNLIB_IMPORT(module, "clEnqueueBarrier");
     __clewGetExtensionFunctionAddress   = (PFNCLGETEXTENSIONFUNCTIONADDRESS )CLCC_DYNLIB_IMPORT(module, "clGetExtensionFunctionAddress");
 
+	if(__clewGetPlatformIDs == NULL)
+		return 0;
+
     return 1;
 }
 




More information about the Bf-blender-cvs mailing list