mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-13 17:20:09 +00:00
misc: Add gui nullcheck and initialize thread running field
This commit is contained in:
parent
716ba4db60
commit
b6cd12a860
src/xrt
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue