mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-4296 Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy.
Forgotten DBUG_ASSERT should be replaced with the 'return error'.
This commit is contained in:
@ -972,13 +972,11 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
|
||||
const char *data= m_data;
|
||||
bool first_loop= 1;
|
||||
|
||||
if (no_data(data, 4))
|
||||
if (no_data(data, 4) ||
|
||||
(n_linear_rings= uint4korr(data)) == 0)
|
||||
return 1;
|
||||
n_linear_rings= uint4korr(data);
|
||||
data+= 4;
|
||||
|
||||
DBUG_ASSERT(n_linear_rings > 0);
|
||||
|
||||
while (n_linear_rings--)
|
||||
{
|
||||
uint32 n_points, org_n_points;
|
||||
|
Reference in New Issue
Block a user