On Tue, 17 Dec 2024 14:16:53 GMT, Alexey Ivanov <[email protected]> wrote:
>> src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java line
>> 1203:
>>
>>> 1201: */
>>> 1202: static Image getSystemIcon(SystemIcon iconType) {
>>> 1203: long hIcon = getSystemIcon(iconType.getIconID());
>>
>> What is hIcon value here? If it is 0 we can simply add the same condition as
>> in the getShell32Icon and avoid all the makeIcon and disposeIcon calls. Or
>> we have a valid hIcon code but makeIcon is unable to construct an icon for
>> it?
>
> Yes, I think you should add the condition `if (hIcon != 0)` before calling
> `makeIcon(hIcon)`.
Updated
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22776#discussion_r1896099961