diff options
author | Alberto Mardegan <mardy@users.sourceforge.net> | 2007-06-15 10:27:28 +0000 |
---|---|---|
committer | Alberto Mardegan <mardy@users.sourceforge.net> | 2007-06-15 10:27:28 +0000 |
commit | 99129ada8841bf39380ad6dbb370a12a818c5beb (patch) | |
tree | 7310ef68e7daf621b1f2887abb034e13e96ab782 | |
parent | 60acc82936f8ab9fcdb832169444277814a2e8f2 (diff) |
Turn a (wrong) assertion into a runtime check. Fixes: NB#54826.
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@60 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | libmissioncontrol/mc-account-monitor.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2007-06-15 Alberto Mardegan <alberto.mardegan@nokia.com> + * libmissioncontrol/mc-account-monitor.c: + Turn a (wrong) assertion into a runtime check. Fixes: NB#54826. + * src/mcd-connection.c, src/mcd-master.c: Don't crash if we fail to retrieve account or profile data. Fixes: NB#59649. @@ -11,7 +14,7 @@ * src/mcd-connection.c: Don't let libtelepathy connect the connection by itself; this ensure - we don't lose any status changed signal. + we don't lose any status changed signal. Fixes: NB#54624. * src/mcd-channel.c: Check for the group interface, before using it. diff --git a/libmissioncontrol/mc-account-monitor.c b/libmissioncontrol/mc-account-monitor.c index 9aaf2fc4..9aa69e4e 100644 --- a/libmissioncontrol/mc-account-monitor.c +++ b/libmissioncontrol/mc-account-monitor.c @@ -190,7 +190,7 @@ _account_name_from_key (const gchar *key) const gchar *base, *slash; g_assert (key == strstr (key, MC_ACCOUNTS_GCONF_BASE)); - g_assert (strlen (key) > base_len + 1); + if (strlen (key) <= base_len + 1) return NULL; base = key + base_len + 1; slash = index (base, '/'); @@ -228,6 +228,7 @@ _gconf_notify_cb (GConfClient *client, guint conn_id, GConfEntry *entry, key = key_name (entry->key); key_is_enabledness = strcmp (key, MC_ACCOUNTS_GCONF_KEY_ENABLED) == 0; name = _account_name_from_key (entry->key); + if (!name) return; account = g_hash_table_lookup (priv->accounts, name); /* Was account complete before? */ |