diff --git a/frontend/drivers/platform_linux.c b/frontend/drivers/platform_linux.c index d8b2617538..be7968a92a 100644 --- a/frontend/drivers/platform_linux.c +++ b/frontend/drivers/platform_linux.c @@ -807,8 +807,7 @@ static void check_proc_acpi_sysfs_battery(const char *node, *percent = capacity; end: - if (buf) - free(buf); + free(buf); buf = NULL; } diff --git a/gfx/video_driver.c b/gfx/video_driver.c index d93decb44d..d1a0bf9a14 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2101,7 +2101,8 @@ void video_driver_frame(const void *data, unsigned width, video_driver_msg[0] = '\0'; - if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) && msg) + if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) + && settings->video.font_enable && msg) strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); if (!current_video || !current_video->frame( diff --git a/runloop.c b/runloop.c index de6ae19288..52f539454f 100644 --- a/runloop.c +++ b/runloop.c @@ -146,10 +146,6 @@ void runloop_msg_queue_push(const char *msg, bool flush) { runloop_ctx_msg_info_t msg_info; - settings_t *settings = config_get_ptr(); - - if (!settings || !settings->video.font_enable) - return; #ifdef HAVE_THREADS slock_lock(_runloop_msg_queue_lock);