I test to push in repo that i don't have permissions, it crash before showing dialog. Now it show it.
Details
Details
- Reviewers
elvisangelaccio alexeymin - Group Reviewers
Dolphin - Commits
- R449:9f8f6c152116: [gitpushdialog] Check GitWrapper::branches index validity
Diff Detail
Diff Detail
- Repository
- R449 Plugins for Dolphin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
branches is a QStringList, so, we could also check that currentBranchIndex < branches.size() in condition, if it is all about bounds checking.
Anyway, the diff compiles and overall looks harmless. I'd say +1, I did not try to reproduce the crash though
Comment Actions
In this case GitWrapper::branches sets valid index or -1, so it's not need bound check.