misc: Add gui nullcheck and initialize thread running field

This commit is contained in:
Mateo de Mayo 2022-03-15 15:19:17 -03:00
parent 716ba4db60
commit b6cd12a860
2 changed files with 5 additions and 1 deletions
src/xrt
auxiliary/os
targets/openxr

View file

@ -317,6 +317,8 @@ struct os_thread_helper
static inline int
os_thread_helper_init(struct os_thread_helper *oth)
{
U_ZERO(oth);
int ret = pthread_mutex_init(&oth->mutex, NULL);
if (ret != 0) {
return ret;

View file

@ -302,7 +302,9 @@ oxr_sdl2_hack_start(void *hack, struct xrt_instance *xinst, struct xrt_device **
return;
}
xrt_instance_get_prober(xinst, &p->base.xp);
if (xinst != NULL) {
xrt_instance_get_prober(xinst, &p->base.xp);
}
for (size_t i = 0; i < NUM_XDEVS; i++) {
p->base.xdevs[i] = xdevs[i];