Skip to content

Commit 303d084

Browse files
Mytherinkrlmlr
authored andcommitted
Merge pull request duckdb/duckdb#8207 from krlmlr/b-copy-string
R: Avoid crash when finalizing
1 parent 91a3ea0 commit 303d084

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using namespace duckdb;
44

55
void duckdb::ConnDeleter(ConnWrapper *conn) {
6-
cpp11::warning("Connection is garbage-collected, use dbDisconnect() to avoid this.");
6+
cpp11::warning(std::string("Connection is garbage-collected, use dbDisconnect() to avoid this."));
77
delete conn;
88
}
99

src/database.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
using namespace duckdb;
1010

1111
void duckdb::DBDeleter(DBWrapper *db) {
12-
cpp11::warning("Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or "
13-
"duckdb::duckdb_shutdown(drv) to avoid this.");
12+
cpp11::warning(std::string("Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or "
13+
"duckdb::duckdb_shutdown(drv) to avoid this."));
1414
delete db;
1515
}
1616

0 commit comments

Comments
 (0)