From: Ray Strode Date: Sun, 24 Dec 2023 20:27:49 +0000 (-0500) Subject: ply-input-device: Fix crasher X-Git-Tag: 23.358.4~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9bc80efb5cea2e2b2c321398f5d3d87b76ff845;p=thirdparty%2Fplymouth.git ply-input-device: Fix crasher If we have an error during early input device initialization we can blow assertion because we may try to cleave it from the event loop it is not yet attached to. This commit fixes that. --- diff --git a/src/libply-splash-core/ply-input-device.c b/src/libply-splash-core/ply-input-device.c index 81a0b7e5..2e8a5a90 100644 --- a/src/libply-splash-core/ply-input-device.c +++ b/src/libply-splash-core/ply-input-device.c @@ -558,7 +558,8 @@ ply_input_device_free (ply_input_device_t *input_device) free (input_device->path); - ply_event_loop_stop_watching_fd (input_device->loop, input_device->fd_watch); + if (input_device->fd_watch != NULL) + ply_event_loop_stop_watching_fd (input_device->loop, input_device->fd_watch); close (input_device->fd);