From 4f9e547592286caa541042454cf7815aa42f2e11 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 20 Oct 2004 16:53:01 +0000 Subject: - touch ~/Applications/addressbook/addressbook.xml lead to a Crash on XML loading. Don't assume that the Child of the first element is present --- 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 ){ -- cgit v0.9.0.2