SWDEV-269246 - Fixed null-case logic for hipCtxPopCurrent

Change-Id: Ic173980caccde8afee85a75c55a5d536f421549e


[ROCm/clr commit: 5c2eb09624]
Bu işleme şunda yer alıyor:
Arya.Rafii authored and Arya Rafii committed 2021-02-24 13:20:24 -05:00
1 ebeveyn 9374c2bb93
işleme 64f7d5b430
1 file changed
+3 -5
+3 -5
Dosyayı Görüntüle
@@ -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");