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

John Ralls jralls at code.gnucash.org
Tue Feb 26 23:45:51 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/d5297a46 (commit)
	from  https://github.com/Gnucash/gnucash/commit/548ee9f5 (commit)



commit d5297a46bf121a35bea97854c4dbc9bd94a65163
Author: loftx <dev at loftx.co.uk>
Date:   Tue Feb 26 15:37:01 2019 +0100

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

diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
index bb844fd64..748f3afe5 100644
--- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp
+++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
@@ -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)



Summary of changes:
 libgnucash/backend/dbi/gnc-backend-dbi.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list