summaryrefslogtreecommitdiff
authoreilers <eilers>2003-01-13 15:49:31 (UTC)
committer eilers <eilers>2003-01-13 15:49:31 (UTC)
commit6bae3504f8eacd604bc6d543d3eb09f996221dcc (patch) (side-by-side diff)
tree14032f862c724319b7b538e054cd53c11994bb4d
parent01f7b3b512bbb729ac44808748365699748f3d4c (diff)
downloadopie-6bae3504f8eacd604bc6d543d3eb09f996221dcc.zip
opie-6bae3504f8eacd604bc6d543d3eb09f996221dcc.tar.gz
opie-6bae3504f8eacd604bc6d543d3eb09f996221dcc.tar.bz2
Fixing crash when businesscard.vcf is missing..
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_vcard.cpp9
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.cpp b/libopie/pim/ocontactaccessbackend_vcard.cpp
index ca9e410..1dc6b48 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.cpp
+++ b/libopie/pim/ocontactaccessbackend_vcard.cpp
@@ -18,4 +18,7 @@
* History:
* $Log$
+ * Revision 1.6 2003/01/13 15:49:31 eilers
+ * Fixing crash when businesscard.vcf is missing..
+ *
* Revision 1.5 2002/12/07 13:26:22 eilers
* Fixing bug in storing anniversary..
@@ -56,7 +59,13 @@ bool OContactAccessBackend_VCard::load ()
VObject* obj = 0l;
+
+ if ( QFile( m_file ).exists() ){
obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() );
if ( !obj )
return false;
+ }else{
+ qWarning("File \"%s\" not found !", m_file.latin1() );
+ return false;
+ }
while ( obj ) {
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index ca9e410..1dc6b48 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -18,4 +18,7 @@
* History:
* $Log$
+ * Revision 1.6 2003/01/13 15:49:31 eilers
+ * Fixing crash when businesscard.vcf is missing..
+ *
* Revision 1.5 2002/12/07 13:26:22 eilers
* Fixing bug in storing anniversary..
@@ -56,7 +59,13 @@ bool OContactAccessBackend_VCard::load ()
VObject* obj = 0l;
+
+ if ( QFile( m_file ).exists() ){
obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() );
if ( !obj )
return false;
+ }else{
+ qWarning("File \"%s\" not found !", m_file.latin1() );
+ return false;
+ }
while ( obj ) {