diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-06-15 19:05:34 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-06-15 19:05:47 +0200 |
| commit | 46b89686df06102af64454bc7b2e722c1ff16927 (patch) | |
| tree | 8e73dc3298cb6a24069c8f2fd8abedb7f71e9ca0 /src/Fl_cocoa.mm | |
| parent | 91b78572c7ab2e4bd7692d2aa5352fcbbb33b236 (diff) | |
Allow using an Fl_SVG_Image object as window icon.
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 31f5bd08e..8d09c8759 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -4516,6 +4516,7 @@ void Fl_Cocoa_Window_Driver::icons(const Fl_RGB_Image *icons[], int count) { [icon_image release]; icon_image = nil; if (count >= 1 && pWindow->border() && pWindow->label() && strlen(pWindow->label())) { + ((Fl_RGB_Image*)icons[0])->normalize(); icon_image = rgb_to_nsimage(icons[0]); } } |
