st/oxr: Fix segfault in conformance

This commit is contained in:
Ryan Pavlik 2020-01-23 15:13:42 -06:00
parent eaf834249b
commit c590a3f69b

View file

@ -512,12 +512,16 @@ oxr_session_frame_end(struct oxr_logger *log,
*/
if (frameEndInfo->layers == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
return oxr_error(log, XR_ERROR_LAYER_INVALID,
"(frameEndInfo->layers == NULL)");
}
if (frameEndInfo->layers[0] == NULL) {
return oxr_error(log, XR_ERROR_LAYER_INVALID,
"(frameEndInfo->layers[0] == NULL)");
}
if (frameEndInfo->layers[0]->type !=
XR_TYPE_COMPOSITION_LAYER_PROJECTION) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
return oxr_error(log, XR_ERROR_LAYER_INVALID,
"(frameEndInfo->layers[0]->type)");
}