odbc32: Don't crash on null pointers while TRACE enabled.

This commit is contained in:
Nikolay Sivov 2010-04-20 02:27:50 +04:00 committed by Alexandre Julliard
parent 7371d0d2fc
commit c31c4454aa
1 changed files with 2 additions and 2 deletions

View File

@ -959,9 +959,9 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
if (TRACE_ON(odbc))
{
TRACE("returns: %d \t", ret);
if (*NameLength1 > 0)
if (NameLength1 && *NameLength1 > 0)
TRACE("DataSource = %s,", ServerName);
if (*NameLength2 > 0)
if (NameLength2 && *NameLength2 > 0)
TRACE(" Description = %s", Description);
TRACE("\n");
}