Ticket #13843: GEOSContextHandle.patch

File GEOSContextHandle.patch, 606 bytes (added by gorodechnyj, 13 years ago)

Ignores AttributeError: "'NoneType' object has no attribute 'finishGEOS_r'"

  • /home/mudblood/

    old new  
    1111        self.ptr = lgeos.initGEOS_r(notice_h, error_h)
    1212
    1313    def __del__(self):
    14         if self.ptr: lgeos.finishGEOS_r(self.ptr)
     14        try:
     15            if self.ptr: lgeos.finishGEOS_r(self.ptr)
     16        except AttributeError:
     17            pass
    1518
    1619# Defining a thread-local object and creating an instance
    1720# to hold a reference to GEOSContextHandle for this thread.
Back to Top