Skip to content

Commit 32aeaf9

Browse files
committed
Check that there are docs available when activating...
1 parent 7719a25 commit 32aeaf9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PluginCore/PluginCore/Managers/DocumentManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ public static void ActivateDocument(Int32 index)
104104
{
105105
PluginBase.MainForm.Documents[index].Activate();
106106
}
107-
else PluginBase.MainForm.Documents[0].Activate();
107+
else if (PluginBase.MainForm.Documents.Length > 0)
108+
{
109+
PluginBase.MainForm.Documents[0].Activate();
110+
}
108111
}
109112

110113
/// <summary>

0 commit comments

Comments
 (0)