Kaydet (Commit) 77327a03 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1358843 Argument cannot be negative

Change-Id: I97911406d55464f042922a2e37b33f92e2c024ef
üst 7739bd5f
......@@ -435,7 +435,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).");
}
......
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