The open source OpenXR runtime
0
fork

Configure Feed

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

ipc: Change init order to avoid assertion

authored by

Jarvis Huang and committed by
Jakob Bornecrantz
aa6b8cd8 cd163e36

+9 -8
+9 -8
src/xrt/ipc/server/ipc_server_process.c
··· 148 148 149 149 ipc_server_mainloop_deinit(&s->ml); 150 150 151 + u_process_destroy(s->process); 152 + 151 153 os_mutex_destroy(&s->global_state.lock); 152 - u_process_destroy(s->process); 153 154 } 154 155 155 156 static int ··· 450 451 xrt_result_t xret; 451 452 int ret; 452 453 454 + ret = os_mutex_init(&s->global_state.lock); 455 + if (ret < 0) { 456 + IPC_ERROR(s, "Global state lock mutex failed to init!"); 457 + teardown_all(s); 458 + return ret; 459 + } 460 + 453 461 s->process = u_process_create_if_not_running(); 454 462 455 463 if (!s->process) { ··· 501 509 ret = ipc_server_mainloop_init(&s->ml); 502 510 if (ret < 0) { 503 511 IPC_ERROR(s, "Failed to init ipc main loop!"); 504 - teardown_all(s); 505 - return ret; 506 - } 507 - 508 - ret = os_mutex_init(&s->global_state.lock); 509 - if (ret < 0) { 510 - IPC_ERROR(s, "Global state lock mutex failed to inti!"); 511 512 teardown_all(s); 512 513 return ret; 513 514 }