SWDEV-269246 - Fixed null-case logic for hipCtxPopCurrent

Change-Id: Ic173980caccde8afee85a75c55a5d536f421549e


[ROCm/hip commit: 76abab2f24]
This commit is contained in:
Arya.Rafii authored and Arya Rafii committed 2021-02-24 13:20:24 -05:00
1 orang tua 54e273fa87
melakukan ad0b9c80f2
1 file changed
+3 -5
+3 -5
Melihat File
@@ -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");