mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-21 03:57:55 +08:00
Don't crash when a table can't be read for some reason
This commit is contained in:
@@ -1337,6 +1337,11 @@ SQLRETURN SQL_API SQLColumns(
|
|||||||
if (g_ascii_strcasecmp((char*)szTableName, entry->object_name) != 0)
|
if (g_ascii_strcasecmp((char*)szTableName, entry->object_name) != 0)
|
||||||
continue;
|
continue;
|
||||||
table = mdb_read_table(entry);
|
table = mdb_read_table(entry);
|
||||||
|
if ( !table )
|
||||||
|
{
|
||||||
|
LogError ("Could not read table '%s'", szTableName);
|
||||||
|
return SQL_ERROR;
|
||||||
|
}
|
||||||
mdb_read_columns(table);
|
mdb_read_columns(table);
|
||||||
for (j=0; j<table->num_cols; j++) {
|
for (j=0; j<table->num_cols; j++) {
|
||||||
col = g_ptr_array_index(table->columns, j);
|
col = g_ptr_array_index(table->columns, j);
|
||||||
|
Reference in New Issue
Block a user