summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 62d0c7310e5..6cadb0f3aad 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -928,6 +928,8 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
n_linear_rings= uint4korr(data);
data+= 4;
+ DBUG_ASSERT(n_linear_rings > 0);
+
while (n_linear_rings--)
{
uint32 n_points, org_n_points;