[host] nvfbc: prevent possible double free

This commit is contained in:
Geoffrey McRae 2021-01-21 16:28:20 +11:00
parent 9965a4a3a6
commit 6b8161972d

View File

@ -210,8 +210,18 @@ static bool nvfbc_init(void)
static void nvfbc_stop(void)
{
this->stop = true;
lgSignalEvent(this->cursorEvents[0]);
lgSignalEvent(this->frameEvent);
if (this->cursorEvents[0])
{
lgSignalEvent(this->cursorEvents[0]);
this->cursorEvents[0] = NULL;
}
if (this->frameEvent)
{
lgSignalEvent(this->frameEvent);
this->frameEvent = NULL;
}
if (this->pointerThread)
{