diff options
author | dominique.leuenberger@gmail.com <dominique.leuenberger@gmail.com@c587cffe-e639-0410-9787-d7902ae8ed56> | 2012-03-14 21:12:52 +0000 |
---|---|---|
committer | dominique.leuenberger@gmail.com <dominique.leuenberger@gmail.com@c587cffe-e639-0410-9787-d7902ae8ed56> | 2012-03-14 21:12:52 +0000 |
commit | 1d9b468db29c313d947b4454c2fb948ab2e26388 (patch) | |
tree | 517a4a2243d4d4e31825f0fb4be6289b0d9cea93 | |
parent | a6cb86a70344880cb788118199c5f84d41a80fbc (diff) | |
download | libproxy-1d9b468db29c313d947b4454c2fb948ab2e26388.tar.gz |
python bindings: guard the destructor. In case the app is shut down, the destructor might run too late. Fixes issue 176.
git-svn-id: http://libproxy.googlecode.com/svn/trunk@838 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | bindings/python/libproxy.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -19,6 +19,7 @@ New in version 0.4.8 (not yet released) - #172: Allow to forcibly build pacrunner as module (-DBIPR={ON,OFF}) - #173: Libproxy doesn't build with gcc 4.7 - #147: Use ${CMAKE_DL_LIBS} instead of assuming libdl is correct. + - #176: python bindings: guard the destructor. New in version 0.4.7 ============================== diff --git a/bindings/python/libproxy.py b/bindings/python/libproxy.py index 563c2de..15f0210 100644 --- a/bindings/python/libproxy.py +++ b/bindings/python/libproxy.py @@ -121,5 +121,6 @@ class ProxyFactory(object): return proxies def __del__(self): - _libproxy.px_proxy_factory_free(self._pf) + if _libproxy: + _libproxy.px_proxy_factory_free(self._pf) |