mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-22 07:10:34 +00:00
Initialize server->serial in all cases
Running scrcpy --tcpip on a device already connected via TCP/IP did not initialize server->serial. As a consequence, in debug mode, an assertion failed: scrcpy: ../app/src/server.c:770: run_server: Assertion `server->serial' failed. In release mode, scrcpy failed with this error: adb: -s requires an argument
This commit is contained in:
parent
6b422e21bf
commit
3c3c07db05
@ -689,6 +689,11 @@ sc_server_configure_tcpip_unknown_address(struct sc_server *server,
|
||||
if (is_already_tcpip) {
|
||||
// Nothing to do
|
||||
LOGI("Device already connected via TCP/IP: %s", serial);
|
||||
server->serial = strdup(serial);
|
||||
if (!server->serial) {
|
||||
LOG_OOM();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user