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

Fix Crash on clicking "Show All Configurations" in new build #7132

Merged
merged 1 commit into from Dec 31, 2023

Conversation

Paliak
Copy link
Contributor

@Paliak Paliak commented Dec 20, 2023

Fixes #7129

Description of the problem being solved:

Fixes a crash caused by comparing a number to nil. I'm not exactly sure why the code is written the way it is but when the maxCol variable is bigger than 1 and col defaults to 1 failing this:

if section.col and (colY[section.col] or 0) + height + 28 <= viewPort.height and 10 + section.col * 370 <= viewPort.width then

check the first element of the colY table is never actually set. This pr defaults the first element to 0 following the logic in the loop:

colY[c] = colY[c] or 0

@Paliak Paliak added the crash Causes PoB to crash and is High Priority label Dec 20, 2023
@LocalIdentity LocalIdentity merged commit 254cafc into PathOfBuildingCommunity:dev Dec 31, 2023
2 checks passed
@LocalIdentity LocalIdentity changed the title Fix odd null compare caused by column alighnement on odd viewport sizes. Fix Crash on clicking "Show All Configurations" in new build Dec 31, 2023
@Paliak Paliak deleted the issue-7129 branch January 20, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Causes PoB to crash and is High Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on clicking "Show All Configurations"
2 participants