diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-17 11:13:44 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-17 11:13:44 +0200 |
| commit | 3b2d3e0e07b6115b143fb8d4a48cb94bb1e17f95 (patch) | |
| tree | 3d968d7a66bea111e36c716f6c153bf5620ffdef /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication | |
| parent | 2c37dcf7dc299a8ff66a5c46b4b2424d37005e11 (diff) | |
| parent | 9562ca15079cdbf2bcfd11c8c8def4a8e4573a78 (diff) | |
| download | Tango-3b2d3e0e07b6115b143fb8d4a48cb94bb1e17f95.tar.gz Tango-3b2d3e0e07b6115b143fb8d4a48cb94bb1e17f95.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index 6303b1ac8..ccedde974 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -362,6 +362,12 @@ namespace Tango.MachineStudio.UI.StudioApplication if (connectedMachine != null) { Machine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == connectedMachine.SerialNumber); + + if (Machine == null) + { + throw new NullReferenceException($"The specified machine '{connectedMachine.SerialNumber}' could not be found on the database."); + } + ConnectedMachine = connectedMachine; ConnectedMachine.SetMachine(Machine); } |
