Commit 25c98a69 authored by Dan Pascu's avatar Dan Pascu

Check for the audio session item existance before operating on it

parent 616eeb07
......@@ -2216,14 +2216,14 @@ class AudioSessionModel(QAbstractListModel):
self.addSession(session_item)
def _NH_BlinkSessionDidNotAddStream(self, notification):
if notification.data.stream.type == 'audio':
if notification.data.stream.type == 'audio' and notification.sender.items.audio:
session_item = notification.sender.items.audio
session_item.pending_removal = True
call_later(5, self.removeSession, session_item)
self.structureChanged.emit()
def _NH_BlinkSessionDidRemoveStream(self, notification):
if notification.data.stream.type == 'audio':
if notification.data.stream.type == 'audio' and notification.sender.items.audio:
session_item = notification.sender.items.audio
session_item.pending_removal = True
call_later(5, self.removeSession, session_item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment