RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]
Alexey Ivanov
aivanov at openjdk.org
Mon Jan 20 15:47:38 UTC 2025
On Fri, 17 Jan 2025 22:42:09 GMT, Phil Race <prr at openjdk.org> wrote:
>> Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> check using not equal to NULL to match the rest of the code in the function
>
> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 2147:
>
>> 2145: HICON hOldIcon = NULL;
>> 2146: HICON hOldIconSm = NULL;
>> 2147: if ((m_hIcon != NULL) && !m_iconInherited) {
>
> I am not sure why the check for NULL is needed .. but it is OK.
What do you mean? That it could've been just `if ((m_hIcon) && !m_iconInherited)`?
This line is unchanged.
In the majority of cases the surrounding code uses explicit `!= NULL` in `if`-statements.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22932#discussion_r1922591271
More information about the client-libs-dev
mailing list