Fix crash from window issue

This commit is contained in:
KillzXGaming 2019-04-11 19:38:32 -04:00
parent 4779b4cff1
commit 937102c154
4 changed files with 3 additions and 0 deletions

Binary file not shown.

View file

@ -110,6 +110,9 @@ namespace Switch_Toolbox.Library
} }
public UserControl GetActiveContent(Type type = null) public UserControl GetActiveContent(Type type = null)
{ {
if (Runtime.MainForm.ActiveMdiChild == null)
return null;
if (Runtime.MainForm.ActiveMdiChild is ObjectEditor) if (Runtime.MainForm.ActiveMdiChild is ObjectEditor)
{ {
foreach (var ctrl in ((ObjectEditor)Runtime.MainForm.ActiveMdiChild).stPanel2.Controls) foreach (var ctrl in ((ObjectEditor)Runtime.MainForm.ActiveMdiChild).stPanel2.Controls)