Skip to content

Commit 8980826

Browse files
committed
don't iterate protected project on release, ref. #2385
1 parent 3571706 commit 8980826

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Rubberduck.VBEEditor/SafeComWrappers/VBA/VBProject.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ public override void Release(bool final = false)
117117
{
118118
if (!IsWrappingNullReference)
119119
{
120-
References.Release();
121-
VBComponents.Release();
120+
if (Protection == ProjectProtection.Unprotected)
121+
{
122+
References.Release();
123+
VBComponents.Release();
124+
}
122125
base.Release(final);
123126
}
124127
}

0 commit comments

Comments
 (0)