contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp
branchRCL_3
changeset 23 ace62b58f4b2
parent 19 edd621764147
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -339,21 +339,23 @@
     const TLiwGenericParam* param = NULL;
     TInt pos(0);
     param = genericList->FindFirst(pos, KFilters);
-    const CLiwList* maps = param->Value().AsList();
-    CLiwDefaultList* cpMaps = CheckValidityLC(maps);
-    //execute actions
-    for (TInt i = 0; i < cpMaps->Count(); i++)
+    if( param && pos!= KErrNotFound )
         {
-        TLiwVariant mapVariant;
-        mapVariant.PushL();
-        cpMaps->AtL(i, mapVariant);
-        const CCPLiwMap* map =
-                static_cast<const CCPLiwMap*> (mapVariant.AsMap());
-        TRAP_IGNORE(ExecuteActionL(map, ETrue, options));
-        CleanupStack::PopAndDestroy(&mapVariant);
+        const CLiwList* maps = param->Value().AsList();
+        CLiwDefaultList* cpMaps = CheckValidityLC(maps);
+        //execute actions
+        for (TInt i = 0; i < cpMaps->Count(); i++)
+            {
+            TLiwVariant mapVariant;
+            mapVariant.PushL();
+            cpMaps->AtL(i, mapVariant);
+            const CCPLiwMap* map =
+                    static_cast<const CCPLiwMap*> (mapVariant.AsMap());
+            TRAP_IGNORE(ExecuteActionL(map, ETrue, options));
+            CleanupStack::PopAndDestroy(&mapVariant);
+            }
+        CleanupStack::PopAndDestroy(cpMaps);
         }
-
-    CleanupStack::PopAndDestroy(cpMaps);
     CleanupStack::PopAndDestroy(genericList);
     }