Chakratos / mhf-save-manager

A Webapplication to manage Character saves used by the MHF Server emulator Erupe
53 stars 10 forks source link

Null checks for user points #24

Closed Kabutak closed 1 year ago

Kabutak commented 1 year ago

Added null coalescing operators to resolve Issue #23

Tested and confirmed on my end. There may be other entries that need this protection, but I haven't run into other problems yet. More null checks/defenses never hurt though.

Chakratos commented 1 year ago

Thanks for the Pull Request, i prepared something simultaneously ^^ https://github.com/Chakratos/mhf-save-manager/commit/ed52e4b9136a23aafafd3f44e2a270cfcb160aa0 I changed the parameters to reflect the SQL Table, so if someone wants to set it to null (Which would be valid) the setter won't cause an error

Kabutak commented 1 year ago

Swapping the data types to nullable is definitely a better fix. Good call.