mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Merge branch 'win32reg-assertions' into 'master'
GWin32RegistryKey: Move assertions See merge request GNOME/glib!1517
This commit is contained in:
commit
016c39d883
@ -2623,8 +2623,6 @@ g_win32_registry_key_set_property (GObject *object,
|
|||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_PATH:
|
case PROP_PATH:
|
||||||
g_assert (priv->absolute_path_w == NULL);
|
|
||||||
g_assert (priv->absolute_path == NULL);
|
|
||||||
path = g_value_get_string (value);
|
path = g_value_get_string (value);
|
||||||
|
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
@ -2635,20 +2633,21 @@ g_win32_registry_key_set_property (GObject *object,
|
|||||||
if (path_w == NULL)
|
if (path_w == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
g_free (priv->absolute_path_w);
|
/* Construct only */
|
||||||
g_free (priv->absolute_path);
|
g_assert (priv->absolute_path_w == NULL);
|
||||||
|
g_assert (priv->absolute_path == NULL);
|
||||||
priv->absolute_path_w = path_w;
|
priv->absolute_path_w = path_w;
|
||||||
priv->absolute_path = g_value_dup_string (value);
|
priv->absolute_path = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PATH_UTF16:
|
case PROP_PATH_UTF16:
|
||||||
g_assert (priv->absolute_path_w == NULL);
|
|
||||||
g_assert (priv->absolute_path == NULL);
|
|
||||||
path_w = (gunichar2 *) g_value_get_pointer (value);
|
path_w = (gunichar2 *) g_value_get_pointer (value);
|
||||||
|
|
||||||
if (path_w == NULL)
|
if (path_w == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Construct only */
|
||||||
|
g_assert (priv->absolute_path_w == NULL);
|
||||||
priv->absolute_path_w = g_wcsdup (path_w, -1);
|
priv->absolute_path_w = g_wcsdup (path_w, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user