diff --git a/Business/KeyboardInput.cs b/Business/KeyboardInput.cs
index 3e00e8f..df086d4 100644
--- a/Business/KeyboardInput.cs
+++ b/Business/KeyboardInput.cs
@@ -215,13 +215,17 @@ namespace SystemTrayMenu.Handler
iRowKey = i;
iMenuKey = newiMenuKey;
- DataGridViewRow row = dgv.Rows[i];
- RowData rowData = (RowData)row.Cells[2].Value;
- rowData.IsSelected = true;
- if (refreshview)
+
+ if (dgv.Rows.Count > i)
{
- row.Selected = false;
- row.Selected = true;
+ DataGridViewRow row = dgv.Rows[i];
+ RowData rowData = (RowData)row.Cells[2].Value;
+ rowData.IsSelected = true;
+ if (refreshview)
+ {
+ row.Selected = false;
+ row.Selected = true;
+ }
}
}
diff --git a/Business/Menus.cs b/Business/Menus.cs
index 585c545..5ab50f8 100644
--- a/Business/Menus.cs
+++ b/Business/Menus.cs
@@ -456,7 +456,7 @@ namespace SystemTrayMenu.Business
// Case when Folder Dialog open
}
else if (openCloseState == OpenCloseState.Opening ||
- (menus[0].Visible && openCloseState == OpenCloseState.Default))
+ (menus[0] != null && menus[0].Visible && openCloseState == OpenCloseState.Default))
{
openCloseState = OpenCloseState.Closing;
MenusFadeOut();
diff --git a/Packaging/Package.appxmanifest b/Packaging/Package.appxmanifest
index 68ed661..10976f1 100644
--- a/Packaging/Package.appxmanifest
+++ b/Packaging/Package.appxmanifest
@@ -9,7 +9,7 @@
+ Version="1.0.14.0" />
SystemTrayMenu
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index 763dfea..ffe547f 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.12.0")]
-[assembly: AssemblyFileVersion("1.0.12.0")]
+[assembly: AssemblyVersion("1.0.14.0")]
+[assembly: AssemblyFileVersion("1.0.14.0")]