[Pkg-privacy-commits] [tor-monitor] 16/39: Don't crash when trying to remove a nonexistant circuit/stream
Sascha Steinbiss
sascha-guest at moszumanska.debian.org
Tue Aug 25 18:00:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
sascha-guest pushed a commit to branch master
in repository tor-monitor.
commit 3c4bd2386dc5a8493d457b0c36b469bba33453df
Author: Tails developers <tails at boum.org>
Date: Sun Feb 22 00:45:24 2015 +0100
Don't crash when trying to remove a nonexistant circuit/stream
It happens that we try to remove a treeiter that is not valid.
That makes the application segfault instead of raising an extension.
We now use remove_treeiter which fails silently if the iter doesn't exist.
We need to somehow verify that we won't keep on displaying nonexistent streams.
---
tormonitor | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tormonitor b/tormonitor
index a254685..eb2c07e 100755
--- a/tormonitor
+++ b/tormonitor
@@ -338,7 +338,8 @@ class TorMonitorWindow(Gtk.ApplicationWindow):
:var stem.response.events.CircuitEvent circuit: the circuit
"""
- self._treestore.remove(self._circ_to_iter[circuit.id])
+
+ self.remove_treeiter(self._circ_to_iter[circuit.id])
del self._circ_to_iter[circuit.id]
def remove_circuit_delayed(self, circuit):
@@ -424,7 +425,7 @@ class TorMonitorWindow(Gtk.ApplicationWindow):
:var stem.response.events.StreamEvent stream: the stream
"""
- self._treestore.remove(self._stream_to_iter[stream.id])
+ self.remove_treeiter(self._stream_to_iter[stream.id])
del self._stream_to_iter[stream.id]
def remove_stream_delayed(self, stream):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tor-monitor.git
More information about the Pkg-privacy-commits
mailing list