Permalink
Browse files

Fixed assembly exception.

  • Loading branch information...
1 parent 7004733 commit 90bd94364e96b2dd2b4760a31a002b95772cbed3 @mrvux committed Oct 3, 2011
Showing with 30 additions and 18 deletions.
  1. +30 −18 VVVV/VVVV.CV.Factories/StreamProcessorFactory.cs
View
48 VVVV/VVVV.CV.Factories/StreamProcessorFactory.cs
@@ -181,30 +181,42 @@ protected override IEnumerable<INodeInfo> LoadNodeInfos(string filename)
protected void LoadNodeInfosFromFile(string filename, string sourcefilename, ref List<INodeInfo> nodeInfos, bool commitUpdates)
{
- var assembly = Assembly.LoadFrom(filename);
-
- this.filterlocator.Scan(assembly);
-
- foreach (string key in this.filterlocator.RegisteredTypes.Keys)
+ Assembly assembly = null;
+ try
+ {
+ assembly = Assembly.LoadFrom(filename);
+ } catch
{
- Type t = this.filterlocator.RegisteredTypes[key];
- var nodeInfo = FNodeInfoFactory.CreateNodeInfo(key, "Imaging", String.Empty, filename, true);
- nodeInfo.Arguments = Assembly.GetExecutingAssembly().Location.ToLower();
- nodeInfo.Factory = this;
- nodeInfo.Type = NodeType.Plugin;
- nodeInfo.UserData = t;
- nodeInfo.CommitUpdate();
- nodeInfo.UserData = t;
- nodeInfo.AutoEvaluate = true;
- nodeInfos.Add(nodeInfo);
+ assembly = null;
}
- foreach (var nodeInfo in nodeInfos)
+ if (assembly != null)
{
- nodeInfo.Factory = this;
- if (commitUpdates)
+ this.filterlocator.Scan(assembly);
+
+ foreach (string key in this.filterlocator.RegisteredTypes.Keys)
+ {
+ Type t = this.filterlocator.RegisteredTypes[key];
+ var nodeInfo = FNodeInfoFactory.CreateNodeInfo(key, "Imaging", String.Empty, filename, true);
+ nodeInfo.Arguments = Assembly.GetExecutingAssembly().Location.ToLower();
+ nodeInfo.Factory = this;
+ nodeInfo.Type = NodeType.Plugin;
+ nodeInfo.UserData = t;
nodeInfo.CommitUpdate();
+ nodeInfo.UserData = t;
+ nodeInfo.AutoEvaluate = true;
+ nodeInfos.Add(nodeInfo);
+ }
+
+ foreach (var nodeInfo in nodeInfos)
+ {
+ nodeInfo.Factory = this;
+ if (commitUpdates)
+ nodeInfo.CommitUpdate();
+ }
}
+
+
}
#endregion

0 comments on commit 90bd943

Please sign in to comment.