Skip to content

Commit 88a9e8c

Browse files
committed
Fix missing code gen and add check in sysman device get for context
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent bcff54b commit 88a9e8c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/templates/libapi.cpp.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ ${th.make_func_name(n, tags, obj)}(
166166
return ${X}_RESULT_ERROR_UNINITIALIZED;
167167
}
168168
%if re.match(r"\w+DriverGet$", th.make_func_name(n, tags, obj)):
169-
if (${x}_lib::context->${n}DdiTable == nullptr) {
169+
if (!${x}_lib::context || ${x}_lib::context->${n}DdiTable == nullptr) {
170170
return ${X}_RESULT_ERROR_UNINITIALIZED;
171171
}
172172
%endif

source/lib/zes_libapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ zesDriverGet(
115115
if(ze_lib::destruction) {
116116
return ZE_RESULT_ERROR_UNINITIALIZED;
117117
}
118-
if (ze_lib::context->zesDdiTable == nullptr) {
118+
if (!ze_lib::context || ze_lib::context->zesDdiTable == nullptr) {
119119
return ZE_RESULT_ERROR_UNINITIALIZED;
120120
}
121121
static const zes_pfnDriverGet_t pfnGet = [&result] {

0 commit comments

Comments
 (0)