[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 authored and Geoffrey McRae committed 2021-04-29 11:53:19 +10:00
1 parent 6a1ec9420e
commit ec81a353c2
1 file changed
+2 -1
@@ -91,7 +91,8 @@ static void on_mouseMove(int x, int y)
this->hasMousePosition = true;
this->mouseX = x;
this->mouseY = y;
lgSignalEvent(this->cursorEvents[0]);
if (this->cursorEvents[0])
lgSignalEvent(this->cursorEvents[0]);
}
static const char * nvfbc_getName(void)