From b011afe6c86951a71313c106dce6639c647f6c95 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 12 Sep 2014 20:31:22 +0200 Subject: [PATCH] Prevented Attribute error in GDAL objects deletion --- django/contrib/gis/gdal/srs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/gdal/srs.py b/django/contrib/gis/gdal/srs.py index 65989f5c89..3c1a82083b 100644 --- a/django/contrib/gis/gdal/srs.py +++ b/django/contrib/gis/gdal/srs.py @@ -342,7 +342,7 @@ class CoordTransform(GDALBase): def __del__(self): "Deletes this Coordinate Transformation object." - if self._ptr: + if self._ptr and capi: capi.destroy_ct(self._ptr) def __str__(self):