From 2d147924e8e138a4915774ba2a00ef9008d2c661 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 26 Nov 2013 07:51:38 -0500 Subject: [PATCH] 7231: recursion limit during navigation; added non-blocking lock to prevent reentrant calls over and over to prevent overflowing stack --- gramps/plugins/gramplet/backlinks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/gramplet/backlinks.py b/gramps/plugins/gramplet/backlinks.py index a5ca8d1b3..59ebabc05 100644 --- a/gramps/plugins/gramplet/backlinks.py +++ b/gramps/plugins/gramplet/backlinks.py @@ -56,13 +56,16 @@ class Backlinks(Gramplet): """ Display the back references for an object. """ - if self.lock.acquire(): + locked = self.lock.acquire(False) + if locked: for classname, handle in \ self.dbstate.db.find_backlink_handles(active_handle): name = navigation_label(self.dbstate.db, classname, handle)[0] self.model.add((_(classname), name, handle, classname)) self.set_has_data(self.model.count > 0) self.lock.release() + else: + pass # skipped because already updating def get_has_data(self, active_handle): """