uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp
branchRCL_3
changeset 9 0aa5fbdfbc30
parent 3 8ca85d2f0db7
child 19 aecbbf00d063
--- a/uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -2924,8 +2924,13 @@
 TPtrC CAknFastSwapWindowControl::CurrentAppName()
     {
     _AKNTRACE_FUNC_ENTER;
-    TPtrC name = iGrid->Model()->ItemText( iGrid->CurrentDataIndex() );
-    name.Set( name.Mid( name.Find(KTab)+1) );
+    TInt textindex = iGrid->CurrentDataIndex();
+    TPtrC name;
+    if ( textindex > 0 )
+        {
+        name.Set( iGrid->Model()->ItemText( textindex ) );
+        name.Set( name.Mid( name.Find(KTab)+1 ) );
+        }
     _AKNTRACE_FUNC_EXIT;
     return name;
     }