Commit 981e1624 authored by Thomas's avatar Thomas
Browse files

Set watched explorers/inspectors to null upon closing.

parent 8a14c3a0
......@@ -179,6 +179,7 @@ namespace pEp
private void Explorer_Close()
{
Globals.ThisAddIn.RemoveFromWatchedExplorers(this);
this.Explorer = null;
this.Dispose();
}
......
......@@ -48,7 +48,7 @@ namespace pEp
public Outlook.Inspector Inspector { get; private set; } = null;
/// <summary>
/// Gets the Inspector that is wrapped by this WatchedInspector.
/// Gets the Watched Inspector.
/// </summary>
public override dynamic Window
{
......@@ -109,7 +109,6 @@ namespace pEp
if (this.Inspector != null)
{
((Outlook.InspectorEvents_10_Event)this.Inspector).Close -= WatchedInspector_Close;
}
}
......@@ -128,6 +127,7 @@ namespace pEp
private void WatchedInspector_Close()
{
Globals.ThisAddIn.RemoveFromWatchedInspectors(this);
this.Inspector = null;
this.Dispose();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment