Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/odbc32/proxyodbc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 0c0b30f0bef..d6e872aad48 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -55,7 +55,8 @@ static SQLRETURN WINAPI null_SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC
static SQLRETURN WINAPI null_SQLAllocEnv(SQLHENV *EnvironmentHandle) { - *EnvironmentHandle = SQL_NULL_HENV; + if (EnvironmentHandle) + *EnvironmentHandle = SQL_NULL_HENV; TRACE("Not ready\n"); return SQL_ERROR; } @@ -1232,7 +1233,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle);
ret = sql_funcs.pSQLAllocEnv(EnvironmentHandle); - TRACE("Returning %d, EnvironmentHandle %p\n", ret, *EnvironmentHandle); + TRACE("Returning %d, EnvironmentHandle %p\n", ret, EnvironmentHandle ? *EnvironmentHandle : NULL); return ret; }