From c5c3bb2b53a5d10d43c23ebc49a3a591903d0317 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 26 Aug 2026 09:51:58 -0700
Subject: [PATCH] Fixed potential crash when loading invalid cursors or icons
---
src/IMG_bmp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/IMG_bmp.c b/src/IMG_bmp.c
index 79cbf1631..9dfdb27b1 100644
--- a/src/IMG_bmp.c
+++ b/src/IMG_bmp.c
@@ -527,6 +527,7 @@ static bool AddIconEntry(IconEntries *entries, Sint64 offset, int width, int hei
entry->ncolors = ncolors;
entry->hot_x = hot_x;
entry->hot_y = hot_y;
+ entry->surface = NULL;
return true;
}