Backport !1517 “GWin32RegistryKey: Move assertions” to glib-2-64
While these assertions look right at the first glance, they actually crash the program. That's because GObject insists on initializing all construct-only properties to their default values, which results in g_win32_registry_key_set_property() being called multiple times with NULL string, once for each unset property.
If "path" is actually set by the caller, a subsequent call to set "path-utf16" to NULL will fail an assertion, since absolute_path is already non-NULL.
With assertions moved the set-to-NULL calls bail out before an assertion is made.
Trivial backport of !1517 (merged) to glib-2-64
.
Edited by Philip Withnall