Commit 7099ad6f authored by Jani Välimaa's avatar Jani Välimaa

Preferences: Duplicate string gvalues (#70)

Based on Xfwm4 commit:
xfce/xfwm4@056ba6ad

The gvalues strings were considered statics, hence not duplicated.

As the caller frees the strings after setting the gvalue, the actual
content would end up pointing at free data.

Consider string gvalues as regular strings, meaning that the given
string value is duplicated as a gvalue.
parent 77be73f6
Pipeline #2602 passed with stages
in 1 minute and 35 seconds
......@@ -842,7 +842,7 @@ terminal_preferences_dialog_presets_changed (GtkComboBox *combobox
}
else
{
g_value_set_static_string (&src, str);
g_value_set_string (&src, str);
if (G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING)
{
......
......@@ -1441,7 +1441,7 @@ terminal_preferences_load (TerminalPreferences *preferences)
}
else
{
g_value_set_static_string (&src, string);
g_value_set_string (&src, string);
if (G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING)
{
......
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