Resolve 'basic_string::_M_construct null not valid' error when no database is provided in connection string

This commit is contained in:
loftx
2019-02-26 15:37:01 +01:00
parent 548ee9f56b
commit d5297a46bf

View File

@@ -159,7 +159,8 @@ UriStrings::UriStrings(const std::string& uri)
&password, &dbname);
m_protocol = std::string{scheme};
m_host = std::string{host};
m_dbname = std::string{dbname};
if (dbname)
m_dbname = std::string{dbname};
if (username)
m_username = std::string{username};
if (password)