mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
Fix crash when showing all lines after having filtered down to zero lines
This commit is contained in:
parent
8dbfc09163
commit
4be0be249a
1 changed files with 10 additions and 2 deletions
|
@ -1375,10 +1375,18 @@ class Window (object):
|
|||
|
||||
previous_model = self.log_view.props.model
|
||||
if previous_model:
|
||||
line_index = self.get_active_line_index ()
|
||||
selected_index = previous_model.line_index_to_super (line_index)
|
||||
try:
|
||||
line_index = self.get_active_line_index ()
|
||||
except ValueError:
|
||||
selected_index = None
|
||||
else:
|
||||
selected_index = previous_model.line_index_to_super (line_index)
|
||||
|
||||
self.log_view.props.model = model
|
||||
|
||||
if selected_index is None:
|
||||
return
|
||||
|
||||
try:
|
||||
select_index = model.line_index_from_super (selected_index)
|
||||
except IndexError:
|
||||
|
|
Loading…
Reference in a new issue