Skip to content

Commit

Permalink
Avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuslrangel committed Mar 25, 2018
1 parent 482bdd0 commit d910ec5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1621,11 +1621,12 @@ public void ShowIRWindow()

if(HighLogic.LoadedSceneIsEditor || guiFlightEditorWindowOpen)
{
_editorWindowFader.FadeTo(_UIAlphaValue, 0.1f, () => { GUIEnabled = true; appLauncherButton.SetTrue(false); });
if(_editorWindowFader != null)
_editorWindowFader.FadeTo(_UIAlphaValue, 0.1f, () => { GUIEnabled = true; appLauncherButton.SetTrue(false); });
}
else
else if(_controlWindowFader != null)
{
_controlWindowFader.FadeTo(_UIAlphaValue, 0.1f, () => { GUIEnabled = true; appLauncherButton.SetTrue(false); });
_controlWindowFader.FadeTo(_UIAlphaValue, 0.1f, () => { GUIEnabled = true; appLauncherButton.SetTrue(false); });
}

}
Expand Down

0 comments on commit d910ec5

Please sign in to comment.