Skip to content

Commit 024ad9b

Browse files
committed
Fix type checking
1 parent 5f5d4ec commit 024ad9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Patch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ def create_rom_file(patch_file: str) -> Tuple[RomMeta, str]:
2424
if auto_handler:
2525
handler: APAutoPatchInterface = auto_handler(patch_file)
2626
handler.read()
27-
game_version = AutoWorldRegister.world_types[handler.game].world_version
28-
if handler.world_version and game_version != handler.world_version:
27+
if handler.game:
28+
game_version = AutoWorldRegister.world_types[handler.game].world_version
29+
if game_version and handler.world_version and game_version != handler.world_version:
2930
info_msg = "This patch was generated with " \
3031
f"{handler.game} version {handler.world_version.as_simple_string()}, " \
3132
f"but its currently installed version is {game_version.as_simple_string()}. " \

0 commit comments

Comments
 (0)