mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
fix multithreaded import racing condition when frozen
This commit is contained in:
4
Patch.py
4
Patch.py
@@ -10,7 +10,7 @@ import sys
|
||||
from typing import Tuple, Optional
|
||||
|
||||
import Utils
|
||||
from Rom import JAP10HASH, read_rom
|
||||
from Rom import JAP10HASH
|
||||
|
||||
|
||||
def get_base_rom_path(file_name: str = "") -> str:
|
||||
@@ -23,6 +23,7 @@ def get_base_rom_path(file_name: str = "") -> str:
|
||||
|
||||
|
||||
def get_base_rom_bytes(file_name: str = "") -> bytes:
|
||||
from Rom import read_rom
|
||||
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
|
||||
if not base_rom_bytes:
|
||||
file_name = get_base_rom_path(file_name)
|
||||
@@ -160,3 +161,4 @@ if __name__ == "__main__":
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
input("Press enter to close.")
|
||||
|
||||
|
Reference in New Issue
Block a user