summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-08 01:28:03 +0100
committerinfirit <[email protected]>2014-11-28 08:51:50 +0100
commit776c3d99650d1f969d92f127c310667bcede7231 (patch)
tree26f4c1a55e106d9e3644cac237e01059b4cec9d8
parentf7a44ef9fc8c20f9c26350c710efae5cf68a6ff2 (diff)
downloadmate-desktop-776c3d99650d1f969d92f127c310667bcede7231.tar.bz2
mate-desktop-776c3d99650d1f969d92f127c310667bcede7231.tar.xz
Fix two problems that causes m-s-d to crash at start
We need to ref outputs when we are copying them in the parser, and we need to avoid confusing i and j, even if they both have dots. Based on gnome-desktop commit: 11880c8bfd7b3f1edde58b8e83e46ebd59a44311 From: Matthias Clasen <[email protected]>
-rw-r--r--libmate-desktop/mate-rr-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmate-desktop/mate-rr-config.c b/libmate-desktop/mate-rr-config.c
index f20e67d..bab0716 100644
--- a/libmate-desktop/mate-rr-config.c
+++ b/libmate-desktop/mate-rr-config.c
@@ -695,7 +695,8 @@ mate_rr_config_load_filename (MateRRConfig *result, const char *filename, GError
array = g_ptr_array_new ();
for (j = 0; configs[i]->priv->outputs[j] != NULL; j++) {
- g_ptr_array_add (array, configs[i]->priv->outputs[i]);
+ g_object_ref (configs[i]->priv->outputs[j]);
+ g_ptr_array_add (array, configs[i]->priv->outputs[j]);
}
g_ptr_array_add (array, NULL);
result->priv->outputs = (MateRROutputInfo **) g_ptr_array_free (array, FALSE);