summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 245225795..033c809db 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2530,8 +2530,9 @@ 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;
-
- new_cursor = image_to_icon(image, false, hotx, hoty);
+ Fl_RGB_Image *scaled_image = (Fl_RGB_Image*)image->copy();
+ new_cursor = image_to_icon(scaled_image, false, hotx, hoty);
+ delete scaled_image;
if (new_cursor == NULL)
return 0;