diff --git a/src/xrt/state_trackers/oxr/oxr_api_negotiate.c b/src/xrt/state_trackers/oxr/oxr_api_negotiate.c index 411e9ad75..6d995dbcf 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_negotiate.c +++ b/src/xrt/state_trackers/oxr/oxr_api_negotiate.c @@ -290,7 +290,7 @@ oxr_xrGetInstanceProcAddr(XrInstance instance, // We need to set this unconditionally, per the spec. *function = NULL; - if ((void *)instance == NULL) { + if (instance == XR_NULL_HANDLE) { oxr_log_init(&log, "xrGetInstanceProcAddr"); return handle_null(&log, name, function); } diff --git a/src/xrt/state_trackers/oxr/oxr_api_verify.h b/src/xrt/state_trackers/oxr/oxr_api_verify.h index 49145a821..d3187a289 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_verify.h +++ b/src/xrt/state_trackers/oxr/oxr_api_verify.h @@ -18,7 +18,7 @@ extern "C" { lookup) \ do { \ oxr_log_init(log, name); \ - if ((void *)thing == NULL) { \ + if (thing == XR_NULL_HANDLE) { \ return oxr_error(log, XR_ERROR_HANDLE_INVALID, \ "(" #thing " == NULL)"); \ } \ @@ -40,7 +40,7 @@ extern "C" { #define _OXR_VERIFY_SET(log, arg, new_arg, THING) \ do { \ - if ((void *)arg == NULL) { \ + if (arg == XR_NULL_HANDLE) { \ return oxr_error(log, XR_ERROR_HANDLE_INVALID, \ "(" #arg " == NULL)"); \ } \