st/oxr: Fix potential null-deref in events.

Found by clang-tidy
This commit is contained in:
Ryan Pavlik 2019-08-21 14:28:32 -05:00
parent 624fe8ab59
commit dae90d4b42

View file

@ -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)