forked from j62/ctbrec
Fix possible IndexOutOfBoundsException in the follow animation
This commit is contained in:
parent
168ad694ae
commit
9f287b6d81
|
@ -20,7 +20,7 @@ public class SiteUiFactory {
|
|||
private static ChaturbateSiteUi ctbSiteUi;
|
||||
private static MyFreeCamsSiteUi mfcSiteUi;
|
||||
|
||||
public static SiteUI getUi(Site site) {
|
||||
public static synchronized SiteUI getUi(Site site) {
|
||||
if (site instanceof BongaCams) {
|
||||
if (bongaSiteUi == null) {
|
||||
bongaSiteUi = new BongaCamsSiteUi((BongaCams) site);
|
||||
|
|
|
@ -617,7 +617,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
|
||||
private double getFollowedTabYPosition(Tab followedTab) {
|
||||
TabPane tabPane = getTabPane();
|
||||
int idx = tabPane.getTabs().indexOf(followedTab);
|
||||
int idx = Math.max(0, tabPane.getTabs().indexOf(followedTab));
|
||||
for (Node node : tabPane.getChildrenUnmodifiable()) {
|
||||
Parent p = (Parent) node;
|
||||
for (Node child : p.getChildrenUnmodifiable()) {
|
||||
|
|
Loading…
Reference in New Issue