Commit 930d985e authored by peastman's avatar peastman
Browse files

Catch exception when cl::Platform::get() fails.

parent 2fb47a51
......@@ -144,9 +144,14 @@ bool OpenCLPlatform::isPlatformSupported() {
// Make sure at least one OpenCL implementation is installed.
std::vector<cl::Platform> platforms;
cl::Platform::get(&platforms);
if (platforms.size() == 0)
try {
cl::Platform::get(&platforms);
if (platforms.size() == 0)
return false;
}
catch (...) {
return false;
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment