Use GetModuleHandleW ()

Also fix an unwanted ref-count increment on a module HANDLE
This commit is contained in:
Luca Bacci 2022-12-30 16:42:02 +01:00 committed by Jehan
parent f7be0cf68e
commit ed1e4236ba
6 changed files with 15 additions and 14 deletions

View file

@ -204,9 +204,10 @@ gimp_input_device_store_init (GimpInputDeviceStore *store)
gtk_list_store_set_column_types (GTK_LIST_STORE (store),
G_N_ELEMENTS (types), types);
if (!GetModuleHandleEx (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
(LPCTSTR) &gimp_input_device_store_init,
&thismodule))
if (!GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
(LPCTSTR) &gimp_input_device_store_init,
&thismodule))
return;
if ((store->window = create_aux_window (store)) == NULL)