r2217 - trunk/src/target/OM-2007/applications/openmoko-contacts/src
njp at sita.openmoko.org
njp at sita.openmoko.org
Tue Jun 12 12:54:41 CEST 2007
Author: njp
Date: 2007-06-12 12:54:40 +0200 (Tue, 12 Jun 2007)
New Revision: 2217
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-history.c
Log:
Check if entry returns NULL for its contact-uid property, before using it in strcmp() and segfaulting
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-history.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-history.c 2007-06-11 08:31:57 UTC (rev 2216)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-history.c 2007-06-12 10:54:40 UTC (rev 2217)
@@ -497,7 +497,9 @@
MokoJournalEntry *entry = NULL;
if (moko_journal_get_entry_at (priv->journal, i, &entry)) {
- if (strcmp (priv->uid, moko_journal_entry_get_contact_uid (entry)) == 0) {
+ const gchar *uid = moko_journal_entry_get_contact_uid (entry);
+
+ if (uid && strcmp (priv->uid, uid) == 0) {
children = g_list_append (children, entry);
}
}
More information about the commitlog
mailing list