Skip to content

Commit c33ffa3

Browse files
committed
Made the ProjectsRepository ignore protected projects.
1 parent 952cf5e commit c33ffa3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Rubberduck.VBEEditor/ComManagement/ProjectsRepository.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading;
55
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
66
using Rubberduck.VBEditor.Extensions;
7+
using Rubberduck.VBEditor.SafeComWrappers;
78

89
namespace Rubberduck.VBEditor.ComManagement
910
{
@@ -34,6 +35,12 @@ private void LoadProjects()
3435
{
3536
foreach (var project in _projectsCollection)
3637
{
38+
if (project.Protection == ProjectProtection.Locked)
39+
{
40+
project.Dispose();
41+
continue;
42+
}
43+
3744
EnsureValidProjectId(project);
3845
_projects.Add(project.ProjectId, project);
3946
}

0 commit comments

Comments
 (0)