Unverified Commit 8ac16493 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2445 from peastman/clplatform

Catch exception when cl::Platform::get() fails.
parents 2fb47a51 930d985e
......@@ -144,9 +144,14 @@ bool OpenCLPlatform::isPlatformSupported() {
// Make sure at least one OpenCL implementation is installed.
std::vector<cl::Platform> platforms;
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