mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
fix settings screen crash
This commit is contained in:
@@ -165,6 +165,9 @@ class TextureWrapper:
|
|||||||
def load_screen_textures(self, screen_name: str) -> None:
|
def load_screen_textures(self, screen_name: str) -> None:
|
||||||
"""Load textures for a screen."""
|
"""Load textures for a screen."""
|
||||||
screen_path = self.graphics_path / screen_name
|
screen_path = self.graphics_path / screen_name
|
||||||
|
if not screen_path.exists():
|
||||||
|
logger.warning(f"Screen {screen_name} does not exist")
|
||||||
|
return
|
||||||
if (screen_path / 'animation.json').exists():
|
if (screen_path / 'animation.json').exists():
|
||||||
with open(screen_path / 'animation.json') as json_file:
|
with open(screen_path / 'animation.json') as json_file:
|
||||||
self.animations = parse_animations(json.loads(json_file.read()))
|
self.animations = parse_animations(json.loads(json_file.read()))
|
||||||
|
|||||||
Reference in New Issue
Block a user