fix: 切换pip导致弹幕控制器空异常

This commit is contained in:
orz12
2024-02-23 10:50:19 +08:00
parent 7dfbc6202b
commit 823f49cfbc

View File

@@ -95,7 +95,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
List<DanmakuElem>? currentDanmakuList = List<DanmakuElem>? currentDanmakuList =
_plDanmakuController.getCurrentDanmaku(currentPosition); _plDanmakuController.getCurrentDanmaku(currentPosition);
if (currentDanmakuList != null) { if (currentDanmakuList != null && _controller != null) {
Color? defaultColor = playerController.blockTypes.contains(6) Color? defaultColor = playerController.blockTypes.contains(6)
? DmUtils.decimalToColor(16777215) ? DmUtils.decimalToColor(16777215)
: null; : null;