Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mdoc
diff options
context:
space:
mode:
authorJoel Martinez <joelmartinez@gmail.com>2017-11-10 19:36:25 +0300
committerJoel Martinez <joelmartinez@gmail.com>2017-11-10 19:44:48 +0300
commit5f9d184873787a046da36f8a3286ab85142da289 (patch)
tree25660cda6183a59269d1f763be60f7b34d99cfa3 /mdoc
parent296fb1fd3198b31ebca268df24e79985169bca63 (diff)
mdoc: Better null handling.
For a case where an invalid frameworks.xml entry caused a vague error message. Closes #79
Diffstat (limited to 'mdoc')
-rw-r--r--mdoc/Mono.Documentation/MDocUpdater.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/mdoc/Mono.Documentation/MDocUpdater.cs b/mdoc/Mono.Documentation/MDocUpdater.cs
index c7e5d64b..915adfca 100644
--- a/mdoc/Mono.Documentation/MDocUpdater.cs
+++ b/mdoc/Mono.Documentation/MDocUpdater.cs
@@ -979,8 +979,14 @@ namespace Mono.Documentation
}
string defaultTitle = "Untitled";
- if (processedAssemblyCount == 1)
- defaultTitle = assemblies[0].Assemblies.First ().Name.Name;
+ if (processedAssemblyCount == 1 && assemblies[0] != null)
+ {
+ var assembly = assemblies[0].Assemblies.FirstOrDefault();
+ if (assembly != null)
+ defaultTitle = assembly.Name.Name;
+ else
+ Warning($"Seems to be an issue with assembly group '{assemblies[0].Name}'. There are no assemblies loaded.");
+ }
WriteElementInitialText (index.DocumentElement, "Title", defaultTitle);
SortIndexEntries (index_types);