--- a/photosgallery/common/src/glxcommandparser.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/common/src/glxcommandparser.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -215,7 +215,9 @@
User::Leave(KErrArgument);
}
- const CMPXCollectionPath* path = aCommand.ValueCObjectL<CMPXCollectionPath>(aAttribute);
+ CMPXCollectionPath* path = aCommand.ValueCObjectL<CMPXCollectionPath>(aAttribute);
+ // ValueCObjectL returns the ownership of path, hence we need to delete
+ CleanupStack::PushL(path);
RArray<TMPXItemId> list;
path->SelectionL(list);
@@ -230,6 +232,7 @@
aArray.AppendL(TGlxMediaId(list[i]));
}
}
+ CleanupStack::PopAndDestroy(path);
CleanupStack::Pop(&aArray);
}