summaryrefslogtreecommitdiff
path: root/opencl/source/openclwrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'opencl/source/openclwrapper.cxx')
-rw-r--r--opencl/source/openclwrapper.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index e488f79fb8bc..8d57ae44e260 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -703,9 +703,10 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
rtl::Bootstrap::expandMacros(url);
OUString path;
osl::FileBase::getSystemPathFromFileURL(url,path);
- ds_device pSelectedDevice = getDeviceSelection(path, bForceEvaluation);
- pDeviceId = pSelectedDevice.aDeviceID;
-
+ ds_device aSelectedDevice = getDeviceSelection(path, bForceEvaluation);
+ if ( aSelectedDevice.eType != DeviceType::OpenCLDevice)
+ return false;
+ pDeviceId = aSelectedDevice.aDeviceID;
}
if(gpuEnv.mpDevID == pDeviceId)