summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-15 22:22:45 -0400
committerGitHub <noreply@github.com>2023-10-15 22:22:45 -0400
commit9e2ebb24df078dc16e1ebfa398b28bb70f206e75 (patch)
treeb9f060d5dab35a6269ebb952033e3af0a14612f7
parent1a4abd184f8085f29a18453bdc4aabb3c038907a (diff)
parenteae0570a1cae446838f58c7e8c2d2ae6e998811b (diff)
Merge pull request #11794 from german77/linemot
input_common: udp: Avoid crash when trying to map motion before client is ready
-rw-r--r--src/input_common/drivers/udp_client.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index 808b21069..77db60e92 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -338,6 +338,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host,
for (std::size_t index = 0; index < PADS_PER_CLIENT; ++index) {
const PadIdentifier identifier = GetPadIdentifier(client * PADS_PER_CLIENT + index);
PreSetController(identifier);
+ PreSetMotion(identifier, 0);
}
}