locationpickerservice/src/locationpickercollectionlistcontent.cpp
changeset 30 96df3ab41000
parent 20 cd10d5b85554
child 31 8db05346071b
--- a/locationpickerservice/src/locationpickercollectionlistcontent.cpp	Fri Jun 11 13:33:47 2010 +0300
+++ b/locationpickerservice/src/locationpickercollectionlistcontent.cpp	Wed Jun 23 18:07:15 2010 +0300
@@ -32,9 +32,16 @@
 {
     // Create a standard model for the view list
     mModel = new QStandardItemModel( this );
-    // create data manager to manage data in the model
-    mDataManager = LocationPickerDataManager::getInstance();
-    mDataManager->populateModel( *mModel, ELocationPickerCollectionListContent, mOrientation );
+    if(mModel)
+    {
+        // create data manager to manage data in the model
+        mDataManager = LocationPickerDataManager::getInstance();
+        bool populated = mDataManager->populateModel( *mModel, ELocationPickerCollectionListContent, mOrientation );
+        if(!populated)
+        {
+        qFatal("Error creating collection");
+        }
+    }
 }
 
 // ----------------------------------------------------------------------