Skip to content

Commit 6d434f6

Browse files
fix warning #50
1 parent 4a509fa commit 6d434f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backends/source/dppl_sycl_context_interface.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ bool DPPLContext_AreEq (__dppl_keep const DPPLSyclContextRef CtxRef1,
4747

4848
bool DPPLContext_IsHost (__dppl_keep const DPPLSyclContextRef CtxRef)
4949
{
50-
return unwrap(CtxRef)->is_host();
50+
auto Ctx = unwrap(CtxRef)
51+
if (Ctx) {
52+
return Ctx->is_host();
53+
}
54+
return false;
5155
}
5256

5357
void DPPLContext_Delete (__dppl_take DPPLSyclContextRef CtxRef)

0 commit comments

Comments
 (0)