summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-22 14:27:13 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-22 14:27:13 +0100
commit05a3f82a5c385e7f00aa2bb8c1971e1cc99225a3 (patch)
tree6d9a37921c572d108b9ff75f5728e9a1654b1306 /src/Fl_win32.cxx
parent14a5f705c8e3385a637be3377f0800b30c38e589 (diff)
Fix "Setting window custom cursor from SVG image crashes" (#1363)
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index f0a489f22..b5aca1c78 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2770,6 +2770,7 @@ int Fl_WinAPI_Window_Driver::set_cursor(Fl_Cursor c) {
int Fl_WinAPI_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int hoty) {
HCURSOR new_cursor;
Fl_RGB_Image *scaled_image = (Fl_RGB_Image*)image->copy();
+ scaled_image->normalize();
new_cursor = image_to_icon(scaled_image, false, hotx, hoty);
delete scaled_image;
if (new_cursor == NULL)