From 0b8e9263305a388faabafac83565322e18da0537 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 23 Jan 2022 12:02:35 +0100 Subject: [PATCH] Do not process finger events if no control If --no-control is passed, then im->mp is NULL, so processing touches would crash. --- app/src/input_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/input_manager.c b/app/src/input_manager.c index 08531cac..c7290dd6 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -899,6 +899,9 @@ sc_input_manager_handle_event(struct sc_input_manager *im, SDL_Event *event) { case SDL_FINGERMOTION: case SDL_FINGERDOWN: case SDL_FINGERUP: + if (!im->control) { + break; + } sc_input_manager_process_touch(im, &event->tfinger); break; case SDL_DROPFILE: {