summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 3a1d441caac..804bb0a413c 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -413,7 +413,8 @@ QUICK_SELECT::~QUICK_SELECT()
{
if (!dont_free)
{
- file->ha_index_end();
+ if (file->inited)
+ file->ha_index_end();
free_root(&alloc,MYF(0));
}
}