Don't crash when a table can't be read for some reason

This commit is contained in:
Nyall Dawson 2020-08-19 10:40:18 +10:00
parent 463fd0af11
commit b72ac6b1c0

View File

@ -1337,6 +1337,11 @@ SQLRETURN SQL_API SQLColumns(
if (g_ascii_strcasecmp((char*)szTableName, entry->object_name) != 0)
continue;
table = mdb_read_table(entry);
if ( !table )
{
LogError ("Could not read table '%s'", szTableName);
return SQL_ERROR;
}
mdb_read_columns(table);
for (j=0; j<table->num_cols; j++) {
col = g_ptr_array_index(table->columns, j);