diff --git a/src/xrt/state_trackers/oxr/oxr_event.cpp b/src/xrt/state_trackers/oxr/oxr_event.cpp index 7f91a287b..ea5a44bb5 100644 --- a/src/xrt/state_trackers/oxr/oxr_event.cpp +++ b/src/xrt/state_trackers/oxr/oxr_event.cpp @@ -81,6 +81,9 @@ push(struct oxr_instance *inst, struct oxr_event *event) if (ret != XR_SUCCESS) { \ return ret; \ } \ + if (event == NULL) { \ + return XR_ERROR_RUNTIME_FAILURE; \ + } \ *extra = (typeof(*extra))(*event)->ptr(); \ } while (false)