LCL-GTK2: Fix UnityTrayIcon crash on gdk_pixbuf_save. Issue #32258, patch from Benito van der Zander.

git-svn-id: trunk@55709 -
This commit is contained in:
juha 2017-08-19 22:59:38 +00:00
parent f54d4f2318
commit 938d485a23

View File

@ -148,7 +148,7 @@ begin
if FileExists(GlobalIconPath) then
DeleteFile(GlobalIconPath);
GlobalIconPath := IconThemePath + FIconName + '.' + IconType;
gdk_pixbuf_save(GlobalIcon, PChar(GlobalIconPath), IconType, nil);
gdk_pixbuf_save(GlobalIcon, PChar(GlobalIconPath), IconType, nil, [nil]);
if GlobalAppIndicator <> nil then
app_indicator_set_icon(GlobalAppIndicator, PChar(FIconName));
end
@ -184,7 +184,7 @@ begin
if FileExists(GlobalIconPath) then
DeleteFile(GlobalIconPath);
GlobalIconPath := IconThemePath + FIconName + '.' + IconType;
gdk_pixbuf_save(GlobalIcon, PChar(GlobalIconPath), IconType, nil);
gdk_pixbuf_save(GlobalIcon, PChar(GlobalIconPath), IconType, nil, [nil]);
{ Again it seems that icons can only come from files }
app_indicator_set_icon(GlobalAppIndicator, PChar(FIconName));
end;