author | zecke <zecke> | 2004-10-20 16:53:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-20 16:53:01 (UTC) |
commit | 4f9e547592286caa541042454cf7815aa42f2e11 (patch) (side-by-side diff) | |
tree | 3a6249fc0f92e005e6b8cd01ec41027da10bb56b /libopie2 | |
parent | 553864fc23dc7b0f7caab0394361174c25c9287c (diff) | |
download | opie-4f9e547592286caa541042454cf7815aa42f2e11.zip opie-4f9e547592286caa541042454cf7815aa42f2e11.tar.gz opie-4f9e547592286caa541042454cf7815aa42f2e11.tar.bz2 |
- touch ~/Applications/addressbook/addressbook.xml lead to a Crash on XML
loading. Don't assume that the Child of the first element is present
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 00d62ee..18113c2 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp @@ -600,7 +600,7 @@ bool OPimContactAccessBackend_XML::load( const QString filename, bool isJournal */ XMLElement *element = root->firstChild(); //owarn << "OPimContactAccess::load tagName(): " << root->tagName() << "" << oendl; - element = element->firstChild(); + element = element ? element->firstChild() : 0; /* Search Tag "Contacts" which is the parent of all Contacts */ while( element && !isJournal ){ |