diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-12-03 16:25:51 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-12-03 16:26:32 +0100 |
commit | 48dad589e319c3545d9764b101a9834d55a09e43 (patch) | |
tree | 4fb5d3e74dc98dde77127989d75a5567aa247df0 | |
parent | b6785eb5952b23748abb2ff56f004747648920d1 (diff) |
fix crash when no platform is available
Change-Id: I730cd231ab6fe4626fefc1ddab67c1b9d77ecd0a
-rw-r--r-- | sc/source/core/opencl/openclwrapper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index cf74a4be7418..5925440b4198 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -922,6 +922,9 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, size_t& rDeviceId, size_ bool switchOpenclDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEvaluation) { + if(fillOpenCLInfo().empty()) + return false; + cl_device_id pDeviceId = NULL; if(pDevice) pDeviceId = findDeviceIdByDeviceString(*pDevice, fillOpenCLInfo()); |