Server/FormSelectHarmonyCommand.cs
changeset 262 c4749a27966d
parent 257 3f1d16d233dc
     1.1 --- a/Server/FormSelectHarmonyCommand.cs	Tue Aug 30 21:14:18 2016 +0200
     1.2 +++ b/Server/FormSelectHarmonyCommand.cs	Wed Aug 31 16:06:47 2016 +0200
     1.3 @@ -8,6 +8,7 @@
     1.4  using System.Text;
     1.5  using System.Threading.Tasks;
     1.6  using System.Windows.Forms;
     1.7 +using CodeProject.Dialog;
     1.8  
     1.9  namespace SharpDisplayManager
    1.10  {
    1.11 @@ -28,7 +29,15 @@
    1.12          /// <param name="e"></param>
    1.13          private void FormSelectHarmonyCommand_Load(object sender, EventArgs e)
    1.14          {
    1.15 -            PopulateTreeViewHarmony(Program.HarmonyConfig);
    1.16 +            if (Program.HarmonyConfig != null)
    1.17 +            {
    1.18 +                PopulateTreeViewHarmony(Program.HarmonyConfig);
    1.19 +            }
    1.20 +            else
    1.21 +            {
    1.22 +                ErrBox.Show("No Harmony Hub configuration!");
    1.23 +                Close();
    1.24 +            }           
    1.25          }
    1.26  
    1.27          /// <summary>