From 0684ff401ff782b9b8c3989475bb5ee319aab00c Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 14 Oct 2020 19:40:20 +1100 Subject: [PATCH] [client] fix race with call to `on_restart` --- client/src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index ddc94462..7bee040b 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -524,6 +524,8 @@ static int frameThread(void * unused) } lgmpClientUnsubscribe(&queue); + state.lgr->on_restart(state.lgrData); + return 0; } @@ -1155,9 +1157,7 @@ static void toggle_video(SDL_Scancode key, void * opaque) state.stopVideo ? "Video Stream Disabled" : "Video Stream Enabled" ); - if (state.stopVideo) - state.lgr->on_restart(state.lgrData); - else + if (!state.stopVideo) { if (t_frame) {