user32: Load libpng in DllMain.
commitb4333216a73dbc97e09dcbcf194e8abed5f41ff4
authorTim Clem <tclem@codeweavers.com>
Thu, 26 Aug 2021 20:01:19 +0000 (26 13:01 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 27 Aug 2021 16:06:29 +0000 (27 18:06 +0200)
treee6d3363f5869eab1a71562308b463efa12ab301e
parentdd37c3c4a04ef783ada136f561c0d4884a698713
user32: Load libpng in DllMain.

libpng is currently loaded on the first attempt to access a PNG icon
or cursor. That creates a race condition that can deadlock the loader
in certain circumstances if LoadIcon or LoadCursor is called while the
loader lock is held, e.g. from a DllMain.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/user32/cursoricon.c
dlls/user32/png.c
dlls/user32/user_main.c
dlls/user32/user_private.h