summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_cocoa.mm')
-rw-r--r--src/Fl_cocoa.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 66d5227fd..7f12390d2 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4161,6 +4161,11 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
if ((hoty < 0) || (hoty >= image->h()))
return 0;
+ if (image->as_svg_image()) {
+ Fl_RGB_Image *image2 = (Fl_RGB_Image*)image->copy();
+ image2->normalize();
+ image = image2;
+ }
// OS X >= 10.6 can create a NSImage from a CGImage, but we need to
// support older versions, hence this pesky handling.
@@ -4220,6 +4225,7 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
[bitmap release];
[nsimage release];
+ if (image->as_svg_image()) delete image;
return 1;
}