The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

t/common: Add a missing result and null check in North Star builder

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
887b79f5 ad1155f1

+10 -1
+10 -1
src/xrt/targets/common/target_builder_north_star.c
··· 278 278 struct xrt_device **out_head_device) 279 279 { 280 280 struct depthai_slam_startup_settings settings = {0}; 281 + xrt_result_t xret; 281 282 282 283 settings.frames_per_second = 60; 283 284 settings.half_size_ov9282 = true; ··· 322 323 #endif 323 324 324 325 struct xrt_slam_sinks *slam_sinks = NULL; 325 - twrap_slam_create_device(&usysd->xfctx, XRT_DEVICE_DEPTHAI, &slam_sinks, out_head_device); 326 + xret = twrap_slam_create_device(&usysd->xfctx, XRT_DEVICE_DEPTHAI, &slam_sinks, out_head_device); 327 + if (xret != XRT_SUCCESS) { 328 + U_LOG_E("twrap_slam_create_device: %u", xret); 329 + return xrt; 330 + } 331 + if (slam_sinks == NULL) { 332 + U_LOG_E("twrap_slam_create_device: Returned NULL slam_sinks!"); 333 + return XRT_ERROR_DEVICE_CREATION_FAILED; 334 + } 326 335 327 336 struct xrt_slam_sinks entry_sinks = {0}; 328 337 struct xrt_frame_sink *entry_left_sink = NULL;