don't crash if Namespace is null

This commit is contained in:
Michael Becker 2020-09-03 22:30:05 -04:00
parent f7cf937ae9
commit 86b5a9b5e7
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -179,7 +179,7 @@ namespace UniversalEditor.ObjectModels.Markup
MarkupTagElement tagTopLevel = (this.Elements [i] as MarkupTagElement);
if (tagTopLevel != null) {
for (int j = 0; j < tagTopLevel.Attributes.Count; j++) {
if (tagTopLevel.Attributes [j].Namespace.Equals ("xmlns")) {
if ("xmlns".Equals(tagTopLevel.Attributes [j].Namespace)) {
if (tagTopLevel.Attributes [j].Value.Equals (schema)) {
tagPrefix = tagTopLevel.Attributes [j].Name;