Ensured missing content type does not crash network resource loader.
This commit is contained in:
parent
843744c70f
commit
8a385a55d0
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ namespace SafeExamBrowser.Configuration.DataResources
|
|||
/// </remarks>
|
||||
private bool HasHtmlContent(HttpResponseMessage response)
|
||||
{
|
||||
return response.Content.Headers.ContentType.MediaType == MediaTypeNames.Text.Html;
|
||||
return response.Content.Headers.ContentType?.MediaType == MediaTypeNames.Text.Html;
|
||||
}
|
||||
|
||||
private bool IsAvailable(Uri resource)
|
||||
|
|
Loading…
Reference in a new issue