mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-28 06:16:16 +00:00
fix(SceneScriptManager.java): Catch Lua groups NPE
this is a weird issue; found it while testing networking stack and it also crashed the network thread
This commit is contained in:
parent
f29189be8f
commit
af70de316e
@ -507,6 +507,12 @@ public class SceneScriptManager {
|
|||||||
.forEach(
|
.forEach(
|
||||||
block -> {
|
block -> {
|
||||||
block.load(sceneId, meta.context);
|
block.load(sceneId, meta.context);
|
||||||
|
if (block.groups == null) {
|
||||||
|
Grasscutter.getLogger()
|
||||||
|
.error("block.groups null for block {}", block.id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
block.groups.values().stream()
|
block.groups.values().stream()
|
||||||
.filter(g -> !g.dynamic_load)
|
.filter(g -> !g.dynamic_load)
|
||||||
.forEach(
|
.forEach(
|
||||||
|
Loading…
Reference in New Issue
Block a user