Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新 ui 的时候,self.lastSelectIndex 好像没有更新,会导致崩溃 #64

Open
zgGitHub opened this issue Jul 6, 2023 · 0 comments

Comments

@zgGitHub
Copy link

zgGitHub commented Jul 6, 2023

代码位置:WMZDropDownMenu 文件, - (void)judgeBtnTitle:(WMZDropMenuBtn*)sender 方法,第431 行,有可能出现数组越界的崩溃

我在如下判断里面加了 self.titleBtnArr.count>self.lastSelectIndex的判断

if (!self.close&&
                  self.lastSelectIndex >= 0 && self.titleBtnArr.count>self.lastSelectIndex) {
                  WMZDropMenuBtn *lastBtn = self.titleBtnArr[self.lastSelectIndex];
                  [self dataChangeActionSection:[self getTitleFirstDropWthTitleBtn:lastBtn].section WithKey:nil];
              }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant