1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 22:08:20 +08:00

Fix: NavBar failed on random pure black screenshot

This commit is contained in:
LmeSzinc
2023-01-05 20:46:02 +08:00
parent 699d8dd1c8
commit 1b5d3b0beb

View File

@@ -165,8 +165,10 @@ class Navbar:
active, minimum, maximum = self.get_info(main=main)
logger.info(f'Nav item active: {active} from range ({minimum}, {maximum})')
# if active is None:
# continue
# Get None when receiving a pure black screenshot.
if minimum is None or maximum is None:
continue
index = minimum + left - 1 if left is not None else maximum - right + 1
if not minimum <= index <= maximum:
logger.warning(