phonebookui/phonebookservices/src/cntservicehandler.cpp
changeset 46 efe85016a067
parent 31 2a11b5b00470
--- a/phonebookui/phonebookservices/src/cntservicehandler.cpp	Fri Jun 11 13:29:23 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicehandler.cpp	Wed Jun 23 18:02:44 2010 +0300
@@ -137,11 +137,13 @@
     QContact contact;
     QVersitReader reader;
     QFile file(vCardFile);
-    file.open(QIODevice::ReadOnly);
+
+    if (!file.open(QIODevice::ReadOnly))
+        return;
     reader.setDevice(&file);
-    
     reader.startReading();
     reader.waitForFinished();
+
     // Use the resulting document(s)...
     QVersitContactImporter importer;
     QList<QVersitDocument> versitDocuments = reader.results();