Fixed bug when deallocating EContact from GList.
[qwerkisync] / NumberToNameLookup.cpp
index 96eb7f9..6fa3b12 100644 (file)
@@ -82,7 +82,7 @@ NumberToNameLookup::NumberToNameLookup()
                                // Now work out the current name for the contact and add it to the lookup
                                EContactName *contactName = (EContactName*)e_contact_get((EContact*)currentContact->data, E_CONTACT_NAME);
                                char *completeName(e_contact_name_to_string(contactName));
-                               qDebug() << completeName;
+                               //qDebug() << completeName;
 
                                // Looking at each number they have...
                                GList * attrs(e_contact_get_attributes(E_CONTACT(currentContact->data), E_CONTACT_FIRST_PHONE_ID));
@@ -102,7 +102,7 @@ NumberToNameLookup::NumberToNameLookup()
 
                                                        m_ContactDetails.insert(QString(number), QPair<uint, QString>(remote_ebook_uid, QString(completeName)));
 
-                                                       qDebug() << "Number: " << number << ", ID: " << remote_ebook_uid << ", completeName: " << completeName;
+                                                       //qDebug() << "Number: " << number << ", ID: " << remote_ebook_uid << ", completeName: " << completeName;
                                                }
                                        }
                                }
@@ -112,7 +112,7 @@ NumberToNameLookup::NumberToNameLookup()
                                e_contact_name_free(contactName);
 
                                // I hate C-style APIs.
-                               g_object_unref(currentContact);
+                               g_object_unref(currentContact->data);
                        }
 
                        // I *really* hate C-style APIs.