idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp
branchRCL_3
changeset 11 ff572dfe6d86
parent 9 f966699dea19
child 18 d05a55b217df
--- a/idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp	Fri Feb 19 22:42:37 2010 +0200
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnpopupcontroladapter.cpp	Fri Mar 12 15:41:49 2010 +0200
@@ -196,12 +196,13 @@
 //
 void CXnPopupControlAdapter::TryDisplayingStylusPopupL( CXnNode& aPlugin )
     {
-    CXnViewManager* manager( iUiEngine->ViewManager() );
-            
-    CXnPluginData& plugin( manager->ActiveViewData().Plugin( &aPlugin ) );
-        
     HideMenuL();
-    
+    CXnViewManager* manager( iUiEngine->ViewManager() );            
+    CXnPluginData* plugin( manager->ActiveViewData().Plugin( &aPlugin ) );
+    if ( !plugin )
+        {
+        return;
+        }
     TPointerEvent event( iUiEngine->HitTest().PointerEvent() );
     
     delete iStylusPopupMenu;
@@ -214,10 +215,10 @@
     
     for ( TInt i = 0; i < children.Count(); i++ )
         {      
-        PopulateMenuL( plugin, children[i] );
+        PopulateMenuL( *plugin, children[i] );
         }
     
-    ShowMenuL( plugin, event.iParentPosition );
+    ShowMenuL( *plugin, event.iParentPosition );
     }
 
 // -----------------------------------------------------------------------------