Love2dCS icon indicating copy to clipboard operation
Love2dCS copied to clipboard

Don't invoke callbacks after window has quit

Open Keyslam opened this issue 4 years ago • 1 comments

Currently due to how QuitFlag is checked callbacks will still be processed after the window has quit

This can be annoying when you take care of destroying/disposing objects in Quit, but they are still accessed in for example Update. I'd have to manually keep a boolean to track if the window has quit, and do an early return in every callback to fix this. It's also not inline with how LOVE works.

Could this issue be fixed? I'd create a pull request, but I'm not sure when and how the QuitFlag is set.

Keyslam avatar Jul 26 '21 19:07 Keyslam

sorry to late to reply.

the bug is callbacks will still be processed after the window has quit. I can't think of how it happened 😱 , has any case here ?

when you call Event.Quit() it will set Boot.QuitFlag = true;
here Hope it helps you

endlesstravel avatar Jul 30 '21 04:07 endlesstravel