From 303d084b3eb8bc257063c6370837cd2581d374dc Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Jul 2023 14:48:53 +0200 Subject: [PATCH] Merge pull request duckdb/duckdb#8207 from krlmlr/b-copy-string R: Avoid crash when finalizing --- src/connection.cpp | 2 +- src/database.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index d5c4207d..b25a0183 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -3,7 +3,7 @@ using namespace duckdb; void duckdb::ConnDeleter(ConnWrapper *conn) { - cpp11::warning("Connection is garbage-collected, use dbDisconnect() to avoid this."); + cpp11::warning(std::string("Connection is garbage-collected, use dbDisconnect() to avoid this.")); delete conn; } diff --git a/src/database.cpp b/src/database.cpp index 49a7deca..0832e3ee 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -9,8 +9,8 @@ using namespace duckdb; void duckdb::DBDeleter(DBWrapper *db) { - cpp11::warning("Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or " - "duckdb::duckdb_shutdown(drv) to avoid this."); + cpp11::warning(std::string("Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or " + "duckdb::duckdb_shutdown(drv) to avoid this.")); delete db; }