mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #30274 -- Prevented segmentation fault on LineString iteration.
This reverts commit 138a78ec8c
and adds
a test for the regression.
This commit is contained in:
parent
e4bc4f26b2
commit
f2a725fba3
2 changed files with 11 additions and 1 deletions
|
@ -1434,3 +1434,12 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
|
|||
self.assertEqual(p.transform(2774, clone=True), Point(srid=2774))
|
||||
p.transform(2774)
|
||||
self.assertEqual(p, Point(srid=2774))
|
||||
|
||||
def test_linestring_iter(self):
|
||||
ls = LineString((0, 0), (1, 1))
|
||||
it = iter(ls)
|
||||
# Step into CoordSeq iterator.
|
||||
next(it)
|
||||
ls[:] = []
|
||||
with self.assertRaises(IndexError):
|
||||
next(it)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue