1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Multiwindow: Fix segfault on quiting groups, remove dead code

This commit is contained in:
TheSpiritXIII 2015-07-17 10:12:00 -04:00 committed by tux3
parent 1109e0347e
commit aa9a10fa8b

View File

@ -346,23 +346,14 @@ void ContentDialog::cycleContacts(bool forward, bool loop)
}
else if (index >= currentLayout->count())
{
/*if (!loop && currentLayout == friendLayout->getLayoutOffline())
{
forward = !forward; // Go backward.
index += forward ? 2 : -2; // Go back to where started and then one.
continue; // Recheck bounds.
}
else*/
{
currentLayout = nextLayout(currentLayout, forward);
index = 0;
}
currentLayout = nextLayout(currentLayout, forward);
index = 0;
continue;
}
GenericChatroomWidget* chatWidget = dynamic_cast<GenericChatroomWidget*>(currentLayout->itemAt(index)->widget());
if (chatWidget != nullptr)
if (chatWidget != nullptr && chatWidget != activeChatroomWidget)
onChatroomWidgetClicked(chatWidget, false);
return;