From b11ab95f41deefbf70087d5c05fd75169a055358 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 21 Mar 2018 20:41:52 +0100 Subject: [PATCH] Fix crash without CORS config settings fixes #6173 refs #6098 --- lib/remote/httpserverconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index 1592e3839..6e8ea1c58 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -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);