Add a few asserts to debug GUI client crash
The crash seems to happen in the following scenario - * Ostinato and drone are both running (with some devices/streams) * Kill and restart drone * Wait for GUI to reconnect to drone * Click on one of the ports in the port list
This commit is contained in:
parent
c03038167c
commit
ccf5b5ca47
@ -68,6 +68,7 @@ bool PortGroupList::isPort(const QModelIndex& index)
|
|||||||
|
|
||||||
PortGroup& PortGroupList::portGroup(const QModelIndex& index)
|
PortGroup& PortGroupList::portGroup(const QModelIndex& index)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(index.isValid());
|
||||||
Q_ASSERT(mPortGroupListModel.isPortGroup(index));
|
Q_ASSERT(mPortGroupListModel.isPortGroup(index));
|
||||||
|
|
||||||
return *(mPortGroups[index.row()]);
|
return *(mPortGroups[index.row()]);
|
||||||
@ -75,6 +76,8 @@ PortGroup& PortGroupList::portGroup(const QModelIndex& index)
|
|||||||
|
|
||||||
Port& PortGroupList::port(const QModelIndex& index)
|
Port& PortGroupList::port(const QModelIndex& index)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(index.isValid());
|
||||||
|
Q_ASSERT(index.parent().isValid());
|
||||||
Q_ASSERT(mPortGroupListModel.isPort(index));
|
Q_ASSERT(mPortGroupListModel.isPort(index));
|
||||||
return (*mPortGroups.at(index.parent().row())->mPorts[index.row()]);
|
return (*mPortGroups.at(index.parent().row())->mPorts[index.row()]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user