check if index is valid on selection change

This commit is contained in:
iLLiCiTiT 2019-12-05 14:15:04 +01:00
parent ad2a01c1fd
commit 58430956f6

View file

@ -33,5 +33,7 @@ class LogsWindow(QtWidgets.QWidget):
def on_selection_changed(self):
index = self.logs_widget.selected_log()
if not index or not index.isValid():
return
node = index.data(self.logs_widget.model.NodeRole)
self.log_detail.set_detail(node)