Skip to content

Commit eeb205f

Browse files
committed
catch & swallow InvalidOperationException in ConnectionPointInfo.Unadvise
1 parent e50cda0 commit eeb205f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Rubberduck.VBEEditor/Events/ConnectionPointInfo.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ public void Advise(IVBProjectsEventsSink projectsEventsSink)
3535
public void Unadvise()
3636
{
3737
if (!_cookie.HasValue) { throw new InvalidOperationException(); }
38-
_connectionPoint.Unadvise(_cookie.Value);
38+
try
39+
{
40+
_connectionPoint.Unadvise(_cookie.Value);
41+
}
42+
catch (InvalidOperationException)
43+
{
44+
// hey, we tried.
45+
}
3946
}
4047
}
4148
}

0 commit comments

Comments
 (0)