mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] core: fix use of unintalized variable
util_guestCurToLocal may not be able to provide the local position if we do not yet know where the guest cursor is, or the destination render rect dimensions. Acting on this when this information is unknown causes undefined behaivour.
This commit is contained in:
parent
2e239ede3f
commit
09a7e177fa
@ -319,7 +319,9 @@ void core_stopFrameThread(void)
|
||||
void core_handleGuestMouseUpdate(void)
|
||||
{
|
||||
struct DoublePoint localPos;
|
||||
util_guestCurToLocal(&localPos);
|
||||
if (!util_guestCurToLocal(&localPos))
|
||||
return;
|
||||
|
||||
g_state.ds->guestPointerUpdated(
|
||||
g_cursor.guest.x, g_cursor.guest.y,
|
||||
util_clamp(localPos.x, g_state.dstRect.x,
|
||||
|
Loading…
Reference in New Issue
Block a user