aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-08-26 11:12:06 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-08-26 11:12:06 +0300
commit21775c506ddd4c70b771020f7b7c594741d9afa0 (patch)
treef5da6df36d16c368a8482c0df290030fcc17fbde /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
parent4e81425d99f39b8edc10660d72566c6c1408810d (diff)
parent6e2fbaffeec9d6e3518ea9706eea107a4f1b348c (diff)
downloadTango-21775c506ddd4c70b771020f7b7c594741d9afa0.tar.gz
Tango-21775c506ddd4c70b771020f7b7c594741d9afa0.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index f164d7f14..ee4435832 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -516,8 +516,14 @@ namespace Tango.MachineStudio.UI.ViewModels
catch (Exception ex)
{
LogManager.Log(ex);
- _eventLogger.Log(ex, "Error connecting to machine " + x.SelectedMachine.SerialNumber);
+
+ if (x.SelectedMachine != null)
+ {
+ _eventLogger.Log(ex, "Error connecting to machine " + x.SelectedMachine.SerialNumber);
+ }
+
_notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Message);
+
}
InvalidateRelayCommands();