osso73 / classic_games

A series of classic games in Kivy
MIT License
3 stars 1 forks source link

Settings 15puzzle make app crash #85

Closed osso73 closed 3 years ago

osso73 commented 3 years ago

When selecting a theme for game 15puzzle through settings, the app crashes

osso73 commented 3 years ago

This happens only if the game of ahorcado is not loaded. The setting tries to set the theme, but the game is not loaded and produces error. This will happens with other games as well:

This is caused by changes introduced in issue #74. to avoid loading all games at the same time.

osso73 commented 3 years ago

When a change is produced in the config, the method config_change of each game is called. If the game was not loaded in memory, this produces an error. It is important to call the method to ensure that all actions and checks are performed, if any.

I could fix it by checking if the game is already in memory; if not in memory, I load it to memory and call the method.

Solved.