From ae63bfc0aca853e93e32f7101be772e21389dc70 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 5 Jun 2019 14:14:02 -0500 Subject: [PATCH] st/oxr: Adjust two call helper to satisfy spec. --- src/xrt/state_trackers/oxr/oxr_two_call.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xrt/state_trackers/oxr/oxr_two_call.h b/src/xrt/state_trackers/oxr/oxr_two_call.h index 0ab83c516..99fe66776 100644 --- a/src/xrt/state_trackers/oxr/oxr_two_call.h +++ b/src/xrt/state_trackers/oxr/oxr_two_call.h @@ -17,9 +17,12 @@ extern "C" { #define OXR_TWO_CALL_HELPER(log, cnt_input, cnt_output, output, count, data) \ do { \ - if (cnt_output != NULL) { \ - *cnt_output = count; \ + if (cnt_output == NULL) { \ + return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \ + #cnt_output); \ } \ + *cnt_output = count; \ + \ if (cnt_input == 0) { \ return XR_SUCCESS; \ } \