Commit dae90d4b authored by Ryan Pavlik's avatar Ryan Pavlik
Browse files

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

Found by clang-tidy
parent 624fe8ab
...@@ -81,6 +81,9 @@ push(struct oxr_instance *inst, struct oxr_event *event) ...@@ -81,6 +81,9 @@ push(struct oxr_instance *inst, struct oxr_event *event)
if (ret != XR_SUCCESS) { \ if (ret != XR_SUCCESS) { \
return ret; \ return ret; \
} \ } \
if (event == NULL) { \
return XR_ERROR_RUNTIME_FAILURE; \
} \
*extra = (typeof(*extra))(*event)->ptr(); \ *extra = (typeof(*extra))(*event)->ptr(); \
} while (false) } while (false)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment