diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-12 18:47:31 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-12 18:47:31 +0200 |
| commit | f901d520c6a62797eae912144d6c33d5881cc272 (patch) | |
| tree | 76ab476634f2b443a41e8b4f1180d2164f8aceed /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication | |
| parent | 33de2cfe94b9fde80f987aab9ad5aa95be6d4371 (diff) | |
| parent | d9a89773f2f283fbf5596799dd4d50d231817203 (diff) | |
| download | Tango-f901d520c6a62797eae912144d6c33d5881cc272.tar.gz Tango-f901d520c6a62797eae912144d6c33d5881cc272.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); } |
