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:
parent
1109e0347e
commit
aa9a10fa8b
|
@ -346,23 +346,14 @@ void ContentDialog::cycleContacts(bool forward, bool loop)
|
||||||
}
|
}
|
||||||
else if (index >= currentLayout->count())
|
else if (index >= currentLayout->count())
|
||||||
{
|
{
|
||||||
/*if (!loop && currentLayout == friendLayout->getLayoutOffline())
|
currentLayout = nextLayout(currentLayout, forward);
|
||||||
{
|
index = 0;
|
||||||
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;
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericChatroomWidget* chatWidget = dynamic_cast<GenericChatroomWidget*>(currentLayout->itemAt(index)->widget());
|
GenericChatroomWidget* chatWidget = dynamic_cast<GenericChatroomWidget*>(currentLayout->itemAt(index)->widget());
|
||||||
|
|
||||||
if (chatWidget != nullptr)
|
if (chatWidget != nullptr && chatWidget != activeChatroomWidget)
|
||||||
onChatroomWidgetClicked(chatWidget, false);
|
onChatroomWidgetClicked(chatWidget, false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user