Fix crash without CORS config settings

fixes #6173
refs #6098
This commit is contained in:
Michael Friedrich 2018-03-21 20:41:52 +01:00
parent c9d2b968e9
commit b11ab95f41
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ bool HttpServerConnection::ManageHeaders(HttpResponse& response)
Array::Ptr headerAllowOrigin = listener->GetAccessControlAllowOrigin();
if (headerAllowOrigin->GetLength() != 0) {
if (headerAllowOrigin && headerAllowOrigin->GetLength() != 0) {
String origin = m_CurrentRequest.Headers->Get("origin");
{
ObjectLock olock(headerAllowOrigin);