diff --git a/osrepodbmgr/ChangeLog b/osrepodbmgr/ChangeLog index 7519bae..bb36978 100644 --- a/osrepodbmgr/ChangeLog +++ b/osrepodbmgr/ChangeLog @@ -1,3 +1,8 @@ +2017-05-03 Natalia Portillo + + * MainWindow.cs: + Solved some null references. + 2017-05-03 Natalia Portillo * Core.cs: diff --git a/osrepodbmgr/MainWindow.cs b/osrepodbmgr/MainWindow.cs index abeb718..14232ab 100644 --- a/osrepodbmgr/MainWindow.cs +++ b/osrepodbmgr/MainWindow.cs @@ -1160,31 +1160,40 @@ public partial class MainWindow : Window if(string.IsNullOrWhiteSpace(txtLanguages.Text)) { - foreach(LanguagesTypeLanguage language in MainClass.metadata.Languages) + if(MainClass.metadata.Languages != null) { - if(!string.IsNullOrWhiteSpace(txtLanguages.Text)) - txtLanguages.Text += ","; - txtLanguages.Text += language; + foreach(LanguagesTypeLanguage language in MainClass.metadata.Languages) + { + if(!string.IsNullOrWhiteSpace(txtLanguages.Text)) + txtLanguages.Text += ","; + txtLanguages.Text += language; + } } } if(string.IsNullOrWhiteSpace(txtArchitecture.Text)) { - foreach(ArchitecturesTypeArchitecture architecture in MainClass.metadata.Architectures) + if(MainClass.metadata.Architectures != null) { - if(!string.IsNullOrWhiteSpace(txtArchitecture.Text)) - txtArchitecture.Text += ","; - txtArchitecture.Text += architecture; + foreach(ArchitecturesTypeArchitecture architecture in MainClass.metadata.Architectures) + { + if(!string.IsNullOrWhiteSpace(txtArchitecture.Text)) + txtArchitecture.Text += ","; + txtArchitecture.Text += architecture; + } } } if(string.IsNullOrWhiteSpace(txtMachine.Text)) { - foreach(string machine in MainClass.metadata.Systems) + if(MainClass.metadata.Systems != null) { - if(!string.IsNullOrWhiteSpace(txtMachine.Text)) - txtMachine.Text += ","; - txtMachine.Text += machine; + foreach(string machine in MainClass.metadata.Systems) + { + if(!string.IsNullOrWhiteSpace(txtMachine.Text)) + txtMachine.Text += ","; + txtMachine.Text += machine; + } } }