SWDEV-269246 - Fixed null-case logic for hipCtxPopCurrent
Change-Id: Ic173980caccde8afee85a75c55a5d536f421549e
[ROCm/clr commit: 5c2eb09624]
This commit is contained in:
@@ -214,12 +214,10 @@ hipError_t hipCtxPopCurrent(hipCtx_t* ctx) {
|
||||
HIP_INIT_API(hipCtxPopCurrent, ctx);
|
||||
|
||||
hip::Device** dev = reinterpret_cast<hip::Device**>(ctx);
|
||||
if (dev == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidContext);
|
||||
}
|
||||
|
||||
if (!g_ctxtStack.empty()) {
|
||||
*dev = g_ctxtStack.top();
|
||||
if (dev != nullptr) {
|
||||
*dev = g_ctxtStack.top();
|
||||
}
|
||||
g_ctxtStack.pop();
|
||||
} else {
|
||||
DevLogError("Context Stack empty \n");
|
||||
|
||||
Reference in New Issue
Block a user