mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Correct implementation of DeviceImp::releaseResources
Move checking of neoDevice pointer to the beginning of the function. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
99d63facb5
commit
47860bbb19
@@ -1093,6 +1093,8 @@ void DeviceImp::releaseResources() {
|
||||
return;
|
||||
}
|
||||
|
||||
UNRECOVERABLE_IF(neoDevice == nullptr);
|
||||
|
||||
this->bcsSplit.releaseResources();
|
||||
|
||||
if (neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.get() &&
|
||||
@@ -1131,10 +1133,8 @@ void DeviceImp::releaseResources() {
|
||||
}
|
||||
}
|
||||
|
||||
if (neoDevice) {
|
||||
neoDevice->decRefInternal();
|
||||
neoDevice = nullptr;
|
||||
}
|
||||
neoDevice->decRefInternal();
|
||||
neoDevice = nullptr;
|
||||
|
||||
resourcesReleased = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user