messagingapp/msgsettings/settingsview/src/msgsettingsview.cpp
changeset 46 b1f0785c289d
parent 41 25fe1fe642e3
child 56 f42d9a78f435
--- a/messagingapp/msgsettings/settingsview/src/msgsettingsview.cpp	Fri Jul 09 14:46:10 2010 +0530
+++ b/messagingapp/msgsettings/settingsview/src/msgsettingsview.cpp	Tue Jul 13 22:09:22 2010 +0530
@@ -101,11 +101,18 @@
     //remove the view 
     mMainWindow->removeView(mSMSCenterView);
     
-    //refresh the form
-    mSettingsForm->refreshViewForm();
-
-    //add the current view on top
-    mMainWindow->setCurrentView(this);
+    // This check is needed in case when smsc center view is 
+    // launched directly 
+    if(mMainWindow->views().count() > 0)
+    {
+        QCRITICAL_WRITE("MsgViewManager::onSmsCenterEditViewClosed count>0");
+        
+        //refresh the form
+        mSettingsForm->refreshViewForm();
+        
+        //add the current view on top
+        mMainWindow->setCurrentView(this);
+    }
 }
 
 //eof