mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Prevent bad access potential for removals by checking bounds (#4617)
* Prevent bad access potential for removals by checking bounds Fix #4616 Switch to removeOne instead of bound checking removeAt * Revert server cardzone check
This commit is contained in:
parent
b02adccf87
commit
3e90f109a2
7 changed files with 10 additions and 12 deletions
|
|
@ -442,7 +442,7 @@ void TabSupervisor::replayLeft(TabGame *tab)
|
|||
if (tab == currentWidget())
|
||||
emit setMenu();
|
||||
|
||||
replayTabs.removeAt(replayTabs.indexOf(tab));
|
||||
replayTabs.removeOne(tab);
|
||||
}
|
||||
|
||||
TabMessage *TabSupervisor::addMessageTab(const QString &receiverName, bool focus)
|
||||
|
|
@ -508,7 +508,7 @@ void TabSupervisor::deckEditorClosed(TabDeckEditor *tab)
|
|||
if (tab == currentWidget())
|
||||
emit setMenu();
|
||||
|
||||
deckEditorTabs.removeAt(deckEditorTabs.indexOf(tab));
|
||||
deckEditorTabs.removeOne(tab);
|
||||
removeTab(indexOf(tab));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue