homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp
changeset 3 ff572005ac23
parent 0 79c6a41cd166
child 9 d0529222e3f0
--- a/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp	Mon Jan 18 20:32:13 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsclientrequesthandler.cpp	Tue Jan 26 12:11:15 2010 +0200
@@ -628,7 +628,7 @@
                     CleanupStack::PushL( pluginIter );                                
                     ChspsDomNode* pluginNode =  pluginIter->First();                              
                     TBool steppingtoConfNode(EFalse);                     
-                    while(pluginNode && !steppingtoConfNode)
+                    while( pluginNode && !steppingtoConfNode )
                         {
                         const TDesC8& pluginNodeName = pluginNode->Name();
                          
@@ -643,10 +643,16 @@
                         }
                     CleanupStack::PopAndDestroy( pluginIter );
                     
-                    // Copy the plugin configuration to the main document.
-                    ChspsDomNode* rootCopy = pluginNode->CloneL( node->StringPool());
-                    rootCopy->SetParent( node );
-                    node->AddChildL( rootCopy );                                       
+                    if ( pluginNode )
+                        {
+                        // Copy the plugin configuration to the main document.
+                        ChspsDomNode* rootCopy = pluginNode->CloneL( node->StringPool());
+                        if ( rootCopy )
+                            {
+                            rootCopy->SetParent( node );
+                            node->AddChildL( rootCopy );
+                            }
+                        }
                     } // !pluginOdt else
                 
                 CleanupStack::PopAndDestroy( pluginOdt );