Merge branch 'static_analysis_2_40_patches' into 'master'

Static analysis 2 40 patches

Closes #905

See merge request GNOME/glib!1042
This commit is contained in:
Philip Withnall
2019-08-24 14:22:38 +00:00
4 changed files with 10 additions and 6 deletions

View File

@@ -1729,7 +1729,7 @@ g_object_new_with_custom_constructor (GObjectClass *class,
break;
}
if (j == n_params)
if (value == NULL)
{
value = &cvalues[cvals_used++];
g_value_init (value, pspec->value_type);
@@ -1855,7 +1855,7 @@ g_object_new_internal (GObjectClass *class,
break;
}
if (j == n_params)
if (value == NULL)
value = g_param_spec_get_default_value (pspec);
object_set_property (object, pspec, value, nqueue);