[host] nvfbc: cleanup threads created by nvfbc_init on failure

mouseHook_install and dwmForceComposition both create threads, but these
are only freed in nvfbc_deinit which is not called if nvfbc_init fails.
These should be freed if the pointer thread fails to be created, as
nothing else could be cleaning it up.
This commit is contained in:
Quantum 2021-01-30 01:06:56 -05:00 committed by Geoffrey McRae
parent 25e74301be
commit acc3298344

View file

@ -201,6 +201,8 @@ static bool nvfbc_init(void)
if (!lgCreateThread("NvFBCPointer", pointerThread, NULL, &this->pointerThread)) if (!lgCreateThread("NvFBCPointer", pointerThread, NULL, &this->pointerThread))
{ {
DEBUG_ERROR("Failed to create the NvFBCPointer thread"); DEBUG_ERROR("Failed to create the NvFBCPointer thread");
mouseHook_remove();
dwmUnforceComposition();
return false; return false;
} }