From 6dbbbc71a44315c9ab5dfd42700f27dd9111c6cb Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Thu, 12 Jun 2025 12:50:37 -0700 Subject: [PATCH] remote: update internal state after condition checks --- libportal/remote.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libportal/remote.c b/libportal/remote.c index a0da8231..862f29ec 100644 --- a/libportal/remote.c +++ b/libportal/remote.c @@ -1395,8 +1395,6 @@ void _xdp_session_set_session_state (XdpSession *session, XdpSessionState state) { - session->state = state; - if (state == XDP_SESSION_INITIAL && session->state != XDP_SESSION_INITIAL) { g_warning ("Can't move a session back to initial state"); @@ -1408,6 +1406,7 @@ _xdp_session_set_session_state (XdpSession *session, return; } + session->state = state; if (state == XDP_SESSION_CLOSED) _xdp_session_close (session); }