From f23a900e91b961f77303d83f88655c4cf570446a Mon Sep 17 00:00:00 2001 From: Thomas Anderson <5776225+CrackedPixel@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:22:38 -0600 Subject: [PATCH] fix memory leak found by maiconpintoabreu (#5598) --- src/rcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index c7f33f48d..7a0ddbcc6 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3546,11 +3546,11 @@ AutomationEventList LoadAutomationEventList(const char *fileName) { AutomationEventList list = { 0 }; +#if SUPPORT_AUTOMATION_EVENTS // Allocate and empty automation event list, ready to record new events list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent)); list.capacity = MAX_AUTOMATION_EVENTS; - -#if SUPPORT_AUTOMATION_EVENTS + if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully"); else {