Commit 243c1909 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

win32u: Allow drivers to set the null user driver.

Allow passing NULL as the user driver to __wine_set_user_driver(), to set the internal null user driver. This is useful for drivers that may need to tentatively set their own user driver during setup and reset it on failure. Signed-off-by: 's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent 50c1b197
......@@ -1241,7 +1241,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
}
driver = malloc( sizeof(*driver) );
*driver = *funcs;
*driver = funcs ? *funcs : null_user_driver;
#define SET_USER_FUNC(name) \
do { if (!driver->p##name) driver->p##name = nulldrv_##name; } while(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment