From 1a0139321b86cb42df66b134868643a0b572cecc Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 22 Jun 2018 18:30:36 +0200 Subject: [PATCH] Fix missing installer initialization The current_process field of struct installer was not initialized. Since the installer instance is static, its default value was 0. The call to installer_stop() then called kill(0, SIGTERM) (on Linux), which sent SIGTERM to every process in the process group. In particular, the scrcpy process was killed. As a consequence, the last cleanup steps, like disabling "show touches", were not executed. Fixes . --- app/src/installer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/installer.c b/app/src/installer.c index 2bef19dd..fcb41fc9 100644 --- a/app/src/installer.c +++ b/app/src/installer.c @@ -79,6 +79,8 @@ SDL_bool installer_init(struct installer *installer, const char *serial) { installer->initialized = SDL_FALSE; installer->stopped = SDL_FALSE; + installer->current_process = PROCESS_NONE; + return SDL_TRUE; }