diff options
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r-- | sql/sql_list.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h index e90f16aeb99..3a6e61be9e3 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -260,11 +260,13 @@ public: list_node *node= first; list_node *list_first= list->first; elements=0; - while (node->info && node != list_first) + while (node != list_first) { prev= &node->next; node= node->next; elements++; + if (node == &end_of_list) + return; } *prev= *last; last= prev; |