From 46b89686df06102af64454bc7b2e722c1ff16927 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 15 Jun 2020 19:05:34 +0200 Subject: 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. --- src/Fl_cocoa.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Fl_cocoa.mm') 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]); } } -- cgit v1.2.3