[client] fix race with call to on_restart

This commit is contained in:
Geoffrey McRae 2020-10-14 19:40:20 +11:00
parent 757a90a643
commit 0684ff401f

View File

@ -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)
{