Skip to content

Commit 2dab6a3

Browse files
committed
Fix for CONPY-64:
If a connection will be established without parameters we need to check kwargs before checking if a poolname was specified.
1 parent b1eaf27 commit 2dab6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mariadb_connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ MrdbConnection_connect(
509509

510510

511511
/* if pool name exists, we need to return a connection from pool */
512-
if ((pn= PyDict_GetItemString(kwargs, "pool_name")))
512+
if (kwargs && (pn= PyDict_GetItemString(kwargs, "pool_name")))
513513
{
514514
if ((pool = PyDict_GetItem(cnx_pool, pn)))
515515
{

0 commit comments

Comments
 (0)