aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-23 13:53:20 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-23 13:53:20 +0300
commit5be9839bda4fd56786846e75bd8f7940a5ee3806 (patch)
treea7775de69149c68252cb82eb7f91b966893968c7 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels
parent658d3d07ed46c6fdb7276b614a93b78c3e02060f (diff)
downloadTango-5be9839bda4fd56786846e75bd8f7940a5ee3806.tar.gz
Tango-5be9839bda4fd56786846e75bd8f7940a5ee3806.zip
Machine Studio 3.1
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels')
-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();