diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c index cf8e2e525..199025a13 100644 --- a/src/xrt/compositor/multi/comp_multi_system.c +++ b/src/xrt/compositor/multi/comp_multi_system.c @@ -1,4 +1,5 @@ // Copyright 2019-2024, Collabora, Ltd. +// Copyright 2025, NVIDIA CORPORATION. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -556,8 +557,17 @@ multi_main_loop(struct multi_system_compositor *msc) U_LOG_I("Stopped native session, shutting down."); xrt_comp_end_session(xc); break; - case MULTI_SYSTEM_STATE_STOPPED: break; - default: assert(false); + case MULTI_SYSTEM_STATE_STOPPED: U_LOG_I("Already stopped, nothing to clean up."); break; + case MULTI_SYSTEM_STATE_INIT_WARM_START: + U_LOG_I("Cleaning up from warm start state."); + xrt_comp_end_session(xc); + break; + case MULTI_SYSTEM_STATE_INVALID: + U_LOG_W("Cleaning up from invalid state."); + // Best effort cleanup + xrt_comp_end_session(xc); + break; + default: U_LOG_E("Unknown session state during cleanup: %d", msc->sessions.state); assert(false); } os_thread_helper_unlock(&msc->oth);