summaryrefslogtreecommitdiff
path: root/opencl/source/opencl_device.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'opencl/source/opencl_device.cxx')
-rw-r--r--opencl/source/opencl_device.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index d70ea8180199..2acecdf25754 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -434,7 +434,7 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
rBestDeviceIndex = d;
}
}
- if (profile->devices[rBestDeviceIndex].eType == DeviceType::OpenCLDevice)
+ if (rBestDeviceIndex != -1 && profile->devices[rBestDeviceIndex].eType == DeviceType::OpenCLDevice)
{
SAL_INFO("opencl.device", "Selected Device[" << rBestDeviceIndex << "]: " << profile->devices[rBestDeviceIndex].sDeviceName << "(OpenCL).");
}