Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

Fixed Newgrounds.io segfault

Open aiden3c opened this issue 4 years ago • 2 comments

When building the game on Linux I encountered a segfault from Newgrounds.io. It happens on the title screen right when the Newgrounds logo is supposed to pop up. image This seems to be from noLogin() still making an API call with the blank APIStuff.hx information. The API call looks like it's just for getting the game version.

I wrapped the call in an if ng check, with an else that sets gotOnlineVer to false. This stops the segfault and the everything seems to run completely normally!

Fixes #146!

aiden3c avatar Jan 26 '21 22:01 aiden3c

I updated this to check if the API string was empty or not before making the call. It felt like a cleaner check than what I had before.

aiden3c avatar Jan 26 '21 23:01 aiden3c

This should be implemented into the main repository. Without this supplemental code, custom compiles will crash with a Null Pointer error.

AyeTSG avatar Jan 30 '21 23:01 AyeTSG