[PATCH 1/2] shell32/iconcache: Prevent the imagelists from going out of sync by generating invalid icons from available icons

Gabriel Ivăncescu gabrielopcode at gmail.com
Tue Oct 9 09:21:09 CDT 2018


On Tue, Oct 9, 2018 at 8:47 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> Also, is it possible to have a test for this? Loading single icon size,
> and testing if the remaining sizes are created too?
>
>

I'm not sure how to go about making this test. The function
SIC_LoadIcon loads all sizes by itself, it's only when
PrivateExtractIconsW fails to load only some of the icon sizes (but
not all) that this happens. But I don't know how to make
PrivateExtractIconsW fail only on some icon sizes but not others,
which would be needed for a test.

Also note that PrivateExtractIconsW can return non-zero *even* if the
icon failed to load (so it's still NULL). Checking its return value is
not reliable at all for this context. I don't know if that's a bug in
the function or not, but it's safer this way.



More information about the wine-devel mailing list