From 6a51bcf8fd101a798d0e96f120c7572d389f07a6 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 19 Apr 2020 01:02:35 -0500 Subject: [PATCH] Fix null reference issue [skip ci] --- common/dbcore.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/dbcore.cpp b/common/dbcore.cpp index bc3ce0a72..d85c4b2ae 100644 --- a/common/dbcore.cpp +++ b/common/dbcore.cpp @@ -51,7 +51,11 @@ DBcore::~DBcore() * are re-using the default database connection pointer when we dont have an * external configuration setup ex: (content_database) */ - std::string mysql_connection_host = mysql.host; + std::string mysql_connection_host; + if (mysql.host) { + mysql_connection_host = mysql.host; + } + if (GetOriginHost() != mysql_connection_host) { return; }