Module: wine Branch: master Commit: 2e13067cc6c28626c1f2b662ec7e2a8f9be5b42e URL: https://gitlab.winehq.org/wine/wine/-/commit/2e13067cc6c28626c1f2b662ec7e2a8... Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Mon May 20 20:18:21 2024 -0700 odbc32: Allow null handle for SQLSetEnvAttr. It can be null for SQL_ATTR_CONNECTION_POOLING. --- dlls/odbc32/proxyodbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index c1c43ab8641..d5c271bdfa2 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -1273,9 +1273,7 @@ SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, TRACE("(EnvironmentHandle %p, Attribute %d, Value %p, StringLength %d)\n", EnvironmentHandle, Attribute, Value, StringLength); - if (!handle) return SQL_INVALID_HANDLE; - - params.EnvironmentHandle = handle->unix_handle; + params.EnvironmentHandle = handle ? handle->unix_handle : 0; ret = ODBC_CALL( SQLSetEnvAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret;