[host] nvfbc: fix null dereference in mouse hook handler

Since we now let the mouse hook linger until the process is killed, the
cursor event that the hook signals may now be null, as the capture could
have stopped. If the hook fires during this time, a crash occurs.
This commit is contained in:
Quantum 2021-04-26 03:19:29 -04:00 committed by Geoffrey McRae
parent 6a1ec9420e
commit ec81a353c2

View File

@ -91,6 +91,7 @@ static void on_mouseMove(int x, int y)
this->hasMousePosition = true; this->hasMousePosition = true;
this->mouseX = x; this->mouseX = x;
this->mouseY = y; this->mouseY = y;
if (this->cursorEvents[0])
lgSignalEvent(this->cursorEvents[0]); lgSignalEvent(this->cursorEvents[0]);
} }