[meld] filediff: Handle our delete handler being called multiple times (#502)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Handle our delete handler being called multiple times (#502)
- Date: Sat, 3 Oct 2020 05:32:59 +0000 (UTC)
commit 47a9e0f01dd27db2bba524e8e8790354eb1af798
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Oct 3 14:56:53 2020 +1000
filediff: Handle our delete handler being called multiple times (#502)
This shouldn't happen in general, but if the document lifecycle gets out
of step... it may. While this exception catch is ugly, a traceback here
doesn't actually tell us anything and only serves to break things for
the user.
meld/filediff.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 9c5845fb..dfaf71a0 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1239,7 +1239,10 @@ class FileDiff(Gtk.VBox, MeldDoc):
# TODO: This should not be necessary; remove if and when we
# figure out what's keeping MeldDocs alive for too long.
- del self._cached_match
+ try:
+ del self._cached_match
+ except AttributeError:
+ pass
# TODO: Base the return code on something meaningful for VC tools
self.close_signal.emit(0)
return response
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]