1
1
mirror of https://github.com/dgis/xsddiagram.git synced 2024-08-17 06:20:23 +03:00

Fix a null reference exception in the documentation (Thanks Mario M.).

This commit is contained in:
dgis 2016-10-07 16:41:14 +02:00
parent a4cab091fa
commit 620612b050
6 changed files with 4 additions and 3 deletions

View File

@ -1073,7 +1073,7 @@ namespace XSDDiagram
if (o is XMLSchema.documentation)
{
XMLSchema.documentation documentation = o as XMLSchema.documentation;
if (documentation.Any != null && documentation.Any.Length > 0)
if (documentation.Any != null && documentation.Any.Length > 0 && documentation.Any[0].Value != null)
{
string text = documentation.Any[0].Value;
text = text.Replace("\n", " ");

View File

@ -132,6 +132,7 @@ CHANGES:
version 1.2alpha (2016-09-??)
- Add infer XSD from XML menu.
- Fix a null reference exception in the documentation (Thanks Mario M.).
version 1.1 (2016-07-08)
- Fix SVG page size.

Binary file not shown.

Binary file not shown.

View File

@ -495,7 +495,7 @@ namespace XSDDiagram.Rendering
if (o is XMLSchema.documentation)
{
XMLSchema.documentation documentation = o as XMLSchema.documentation;
if (documentation.Any != null && documentation.Any.Length > 0)
if (documentation.Any != null && documentation.Any.Length > 0 && documentation.Any[0].Value != null)
{
text = documentation.Any[0].Value;
text = text.Replace("\n", " ");

View File

@ -168,7 +168,7 @@ namespace XSDDiagram.Rendering
if (o is XMLSchema.documentation)
{
XMLSchema.documentation documentation = o as XMLSchema.documentation;
if (documentation.Any != null && documentation.Any.Length > 0)
if (documentation.Any != null && documentation.Any.Length > 0 && documentation.Any[0].Value != null)
{
string text = documentation.Any[0].Value;
text = text.Replace("\n", " ");