Skip to content

Fix nil reference error in PopulateProfessionNode#89

Merged
stevin05 merged 1 commit intostevin05:mainfrom
Merryfett:fix-nil-profconfig-recipes
Feb 25, 2026
Merged

Fix nil reference error in PopulateProfessionNode#89
stevin05 merged 1 commit intostevin05:mainfrom
Merryfett:fix-nil-profconfig-recipes

Conversation

@Merryfett
Copy link
Copy Markdown
Contributor

Fixes a crash when opening the config page where profConfig.recipes is nil.

The error occurred when the code iterated through character professions and attempted to call TimeSlice with a nil recipes table. This change adds a guard clause to check if profConfig.recipes exists before processing, and calls the onFinished callback to maintain proper execution flow.

Error fixed: TimeSlice.lua:59: bad argument #1 to 'pairs' (table expected, got nil)

Fixes #88

Fixes a crash when opening the config page where profConfig.recipes is nil.

The error occurred when the code iterated through character professions and attempted to call TimeSlice with a nil recipes table. This change adds a guard clause to check if profConfig.recipes exists before processing, and calls the onFinished callback to maintain proper execution flow.

Error fixed: TimeSlice.lua:59: bad argument stevin05#1 to 'pairs' (table expected, got nil)

Fixes stevin05#88

Co-Authored-By: Claude <noreply@anthropic.com>
@stevin05 stevin05 merged commit 660b890 into stevin05:main Feb 25, 2026
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

Successfully merging this pull request may close these issues.

Fix nil reference error in PopulateProfessionNode when profConfig.recipes is nil

2 participants