diff options
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/table.cc b/sql/table.cc index 9e1c53f7b22..066eb506835 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4487,10 +4487,8 @@ TABLE *TABLE_LIST::get_real_join_table() */ for (TABLE_LIST *t= ti++; t; t= ti++) tbl= t; - /* - It is impossible that the list is empty - so tbl can't be NULL after above loop. - */ + if (!tbl) + return NULL; // view/derived with no tables if (!tbl->nested_join) break; /* go deeper if we've found nested join */ |