Do not recycle filters list as it is not creating new filter instances

just reusing it.
This commit is contained in:
2017-09-11 21:17:47 +01:00
parent e0e2b103a7
commit ec292349ce
8 changed files with 25 additions and 20 deletions

View File

@@ -823,7 +823,7 @@ namespace DiscImageChef.ImagePlugins
int currentLocator = 0;
bool locatorFound = false;
string parentPath = null;
FiltersList filters = new FiltersList();
FiltersList filters;
while(!locatorFound && currentLocator < 8)
{
@@ -852,7 +852,7 @@ namespace DiscImageChef.ImagePlugins
if(parentPath != null)
{
DicConsole.DebugWriteLine("VirtualPC plugin", "Possible parent path: \"{0}\"", parentPath);
Filter parentFilter = filters.GetFilter(Path.Combine(imageFilter.GetParentFolder(), parentPath));
Filter parentFilter = new FiltersList().GetFilter(Path.Combine(imageFilter.GetParentFolder(), parentPath));
if(parentFilter != null)
locatorFound = true;
@@ -868,7 +868,7 @@ namespace DiscImageChef.ImagePlugins
else
{
parentImage = new VHD();
Filter parentFilter = filters.GetFilter(Path.Combine(imageFilter.GetParentFolder(), parentPath));
Filter parentFilter = new FiltersList().GetFilter(Path.Combine(imageFilter.GetParentFolder(), parentPath));
if(parentFilter == null)
throw new ImageNotSupportedException("(VirtualPC plugin): Cannot find parent image filter");