summaryrefslogtreecommitdiff
path: root/liblightdm-gobject/user.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-04-30 11:36:49 +1200
committerRobert Ancell <robert.ancell@canonical.com>2012-04-30 11:36:49 +1200
commit817a82f1852a875c5d5f16782cd4dd47cb6976b2 (patch)
tree747b934fcc473825f0ece09d70bcd6c45b48b473 /liblightdm-gobject/user.c
parent6593deac31bd9bf3d9990b137e2163c0e10e3d01 (diff)
downloadlightdm-git-817a82f1852a875c5d5f16782cd4dd47cb6976b2.tar.gz
Fix allocation error setting default layout array
Diffstat (limited to 'liblightdm-gobject/user.c')
-rw-r--r--liblightdm-gobject/user.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/liblightdm-gobject/user.c b/liblightdm-gobject/user.c
index a21b69f8..6ce2e234 100644
--- a/liblightdm-gobject/user.c
+++ b/liblightdm-gobject/user.c
@@ -1309,14 +1309,16 @@ load_accounts_service (LightDMUser *user)
static void
load_user_values (LightDMUser *user)
{
+ LightDMUserPrivate *priv = GET_USER_PRIVATE (user);
+
load_dmrc (user);
load_accounts_service (user); // overrides dmrc values
/* Ensure a few guarantees */
- if (GET_USER_PRIVATE (user)->layouts == NULL)
+ if (priv->layouts == NULL)
{
- GET_USER_PRIVATE (user)->layouts = g_malloc (sizeof (gchar));
- GET_USER_PRIVATE (user)->layouts[0] = NULL;
+ priv->layouts = g_malloc (sizeof (gchar *) * 1);
+ priv->layouts[0] = NULL;
}
}