Rémi Bernon : win32u: Avoid a crash when cleaning up a monitor without an adapter.
Module: wine Branch: master Commit: 9f3f61283ddfe0715616c596ef7560b94b644623 URL: https://gitlab.winehq.org/wine/wine/-/commit/9f3f61283ddfe0715616c596ef7560b... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 20 22:36:21 2024 +0100 win32u: Avoid a crash when cleaning up a monitor without an adapter. --- dlls/win32u/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 07b9d46d9eb..d5ad97a2c33 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1501,7 +1501,7 @@ static void clear_display_devices(void) while (!list_empty( &monitors )) { monitor = LIST_ENTRY( list_head( &monitors ), struct monitor, entry ); - adapter_release( monitor->adapter ); + if (monitor->adapter) adapter_release( monitor->adapter ); list_remove( &monitor->entry ); free( monitor ); }
participants (1)
-
Alexandre Julliard