Please open an issue about it and attach example project which mimicks GetPackageIcon from your code so I'll take a look into before lazarus 2.2 is launched.Thanks for the reply, sorry for my late reply. I just opened a new issue: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39511 (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39511)