Skip to content

Commit ada355e

Browse files
cristatusgnif
authored andcommitted
[client] app: free the frame event after display server teardown
Display server and overlay teardown can still call app_invalidateWindow, which signals the frame event; the Wayland presentation module does so when it unregisters its graph. Freeing the event beforehand asserted in lgSignalEvent while closing the client.
1 parent 9469c08 commit ada355e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

client/src/main.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,12 +3557,6 @@ static void lg_shutdown(void)
35573557
lgAudio_free();
35583558
lgClipboard_setLocalAvailable(false);
35593559

3560-
if (g_state.frameEvent)
3561-
{
3562-
lgFreeEvent(g_state.frameEvent);
3563-
g_state.frameEvent = NULL;
3564-
}
3565-
35663560
if (e_startup)
35673561
{
35683562
lgFreeEvent(e_startup);
@@ -3587,6 +3581,13 @@ static void lg_shutdown(void)
35873581
g_state.overlays = NULL;
35883582
}
35893583

3584+
// app_invalidateWindow runs during display server and overlay teardown
3585+
if (g_state.frameEvent)
3586+
{
3587+
lgFreeEvent(g_state.frameEvent);
3588+
g_state.frameEvent = NULL;
3589+
}
3590+
35903591
renderQueue_setSourceFns(NULL, NULL, NULL, NULL);
35913592
renderQueue_free();
35923593
LG_LOCK_FREE(g_state.videoSourceLock);

0 commit comments

Comments
 (0)