From 1fd9936f95966d268686d4b2bb5cd91db1590b79 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 5 Jun 2019 14:14:18 -0500 Subject: [PATCH] st/oxr: Fix enumerating swapchain formats on headless --- src/xrt/state_trackers/oxr/oxr_session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xrt/state_trackers/oxr/oxr_session.c b/src/xrt/state_trackers/oxr/oxr_session.c index abeb9fb23..d120416ae 100644 --- a/src/xrt/state_trackers/oxr/oxr_session.c +++ b/src/xrt/state_trackers/oxr/oxr_session.c @@ -62,6 +62,10 @@ oxr_session_enumerate_formats(struct oxr_logger *log, int64_t *formats) { struct xrt_compositor *xc = sess->compositor; + if (formatCountOutput == NULL) { + return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, + "(formatCountOutput)"); + } if (xc == NULL) { if (formatCountOutput != NULL) { *formatCountOutput = 0;