Skip to content

Commit

Permalink
Fix for CONPY-64:
Browse files Browse the repository at this point in the history
If a connection will be established without parameters we need to check kwargs
before checking if a poolname was specified.
  • Loading branch information
9EOR9 committed May 14, 2020
1 parent b1eaf27 commit 2dab6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mariadb_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ MrdbConnection_connect(


/* if pool name exists, we need to return a connection from pool */
if ((pn= PyDict_GetItemString(kwargs, "pool_name")))
if (kwargs && (pn= PyDict_GetItemString(kwargs, "pool_name")))
{
if ((pool = PyDict_GetItem(cnx_pool, pn)))
{
Expand Down

0 comments on commit 2dab6a3

Please sign in to comment.